home *** CD-ROM | disk | FTP | other *** search
Emacs Compiled Lisp | 1991-12-02 | 37.0 KB |
open in:
MacOS 8.1
|
Win98
|
DOS
view JSON data
|
view as text
This file was processed as: Emacs Compiled Lisp
(other/emacsCompiledLisp).
This format is not currently supported by dexvert.
Confidence | Program | Detection | Match Type | Support
|
---|
1%
| dexvert
| Emacs Compiled Lisp (other/emacsCompiledLisp)
| magic
| Unsupported |
1%
| dexvert
| Combustion 2 Particle Library (other/combustion2ParticleLibrary)
| ext
| Unsupported |
100%
| file
| Emacs v18 byte-compiled Lisp data
| default
| |
99%
| file
| data
| default
| |
100%
| gt2
| Kopftext: '(defun open-line (arg) '
| default (weak)
| |
100%
| xdgMime
| text/x-emacs-lisp
| default (weak)
|
|
hex view+--------+-------------------------+-------------------------+--------+--------+
|00000000| 0a 28 64 65 66 75 6e 20 | 6f 70 65 6e 2d 6c 69 6e |.(defun |open-lin|
|00000010| 65 20 28 61 72 67 29 20 | 22 5c 0a 49 6e 73 65 72 |e (arg) |"\.Inser|
|00000020| 74 20 61 20 6e 65 77 6c | 69 6e 65 20 61 6e 64 20 |t a newl|ine and |
|00000030| 6c 65 61 76 65 20 70 6f | 69 6e 74 20 62 65 66 6f |leave po|int befo|
|00000040| 72 65 20 69 74 2e 0a 57 | 69 74 68 20 61 72 67 2c |re it..W|ith arg,|
|00000050| 20 69 6e 73 65 72 74 73 | 20 74 68 61 74 20 6d 61 | inserts| that ma|
|00000060| 6e 79 20 6e 65 77 6c 69 | 6e 65 73 2e 22 20 28 69 |ny newli|nes." (i|
|00000070| 6e 74 65 72 61 63 74 69 | 76 65 20 22 2a 70 22 29 |nteracti|ve "*p")|
|00000080| 20 28 62 79 74 65 2d 63 | 6f 64 65 20 22 c2 88 6e | (byte-c|ode "..n|
|00000090| 85 08 00 6f 3f 18 08 85 | 10 00 c3 c4 21 88 09 c5 |...o?...|....!...|
|000000a0| 56 85 26 00 c6 63 88 60 | 53 62 88 09 53 89 11 88 |V.&..c.`|Sb..S...|
|000000b0| 82 11 00 88 08 85 2e 00 | c3 c7 21 29 87 22 20 5b |........|..!)." [|
|000000c0| 66 6c 61 67 20 61 72 67 | 20 6e 69 6c 20 66 6f 72 |flag arg| nil for|
|000000d0| 77 61 72 64 2d 63 68 61 | 72 20 2d 31 20 30 20 31 |ward-cha|r -1 0 1|
|000000e0| 30 20 31 5d 20 34 29 29 | 0a 0a 28 64 65 66 75 6e |0 1] 4))|..(defun|
|000000f0| 20 73 70 6c 69 74 2d 6c | 69 6e 65 20 6e 69 6c 20 | split-l|ine nil |
|00000100| 22 5c 0a 53 70 6c 69 74 | 20 63 75 72 72 65 6e 74 |"\.Split| current|
|00000110| 20 6c 69 6e 65 2c 20 6d | 6f 76 69 6e 67 20 70 6f | line, m|oving po|
|00000120| 72 74 69 6f 6e 20 62 65 | 79 6f 6e 64 20 70 6f 69 |rtion be|yond poi|
|00000130| 6e 74 20 76 65 72 74 69 | 63 61 6c 6c 79 20 64 6f |nt verti|cally do|
|00000140| 77 6e 2e 22 20 28 69 6e | 74 65 72 61 63 74 69 76 |wn." (in|teractiv|
|00000150| 65 20 22 2a 22 29 20 28 | 62 79 74 65 2d 63 6f 64 |e "*") (|byte-cod|
|00000160| 65 20 22 c2 88 c3 c4 21 | 88 69 60 19 18 c5 63 88 |e "....!|.i`...c.|
|00000170| c6 08 c7 5c 22 88 09 62 | 2a 87 22 20 5b 63 6f 6c |...\"..b|*." [col|
|00000180| 20 70 6f 73 20 6e 69 6c | 20 73 6b 69 70 2d 63 68 | pos nil| skip-ch|
|00000190| 61 72 73 2d 66 6f 72 77 | 61 72 64 20 22 20 09 22 |ars-forw|ard " ."|
|000001a0| 20 31 30 20 69 6e 64 65 | 6e 74 2d 74 6f 20 30 5d | 10 inde|nt-to 0]|
|000001b0| 20 34 29 29 0a 0a 28 64 | 65 66 75 6e 20 71 75 6f | 4))..(d|efun quo|
|000001c0| 74 65 64 2d 69 6e 73 65 | 72 74 20 28 61 72 67 29 |ted-inse|rt (arg)|
|000001d0| 20 22 5c 0a 52 65 61 64 | 20 6e 65 78 74 20 69 6e | "\.Read| next in|
|000001e0| 70 75 74 20 63 68 61 72 | 61 63 74 65 72 20 61 6e |put char|acter an|
|000001f0| 64 20 69 6e 73 65 72 74 | 20 69 74 2e 0a 55 73 65 |d insert| it..Use|
|00000200| 66 75 6c 20 66 6f 72 20 | 69 6e 73 65 72 74 69 6e |ful for |insertin|
|00000210| 67 20 63 6f 6e 74 72 6f | 6c 20 63 68 61 72 61 63 |g contro|l charac|
|00000220| 74 65 72 73 2e 0a 59 6f | 75 20 6d 61 79 20 61 6c |ters..Yo|u may al|
|00000230| 73 6f 20 74 79 70 65 20 | 75 70 20 74 6f 20 33 20 |so type |up to 3 |
|00000240| 6f 63 74 61 6c 20 64 69 | 67 69 74 73 2c 20 74 6f |octal di|gits, to|
|00000250| 20 69 6e 73 65 72 74 20 | 61 20 63 68 61 72 61 63 | insert |a charac|
|00000260| 74 65 72 20 77 69 74 68 | 20 74 68 61 74 20 63 6f |ter with| that co|
|00000270| 64 65 22 20 28 69 6e 74 | 65 72 61 63 74 69 76 65 |de" (int|eractive|
|00000280| 20 22 2a 70 22 29 20 28 | 62 79 74 65 2d 63 6f 64 | "*p") (|byte-cod|
|00000290| 65 20 22 c2 88 c3 20 18 | 09 c4 56 85 16 00 08 63 |e "... .|..V....c|
|000002a0| 88 09 53 89 11 88 82 05 | 00 29 87 22 20 5b 63 68 |..S.....|.)." [ch|
|000002b0| 61 72 20 61 72 67 20 6e | 69 6c 20 72 65 61 64 2d |ar arg n|il read-|
|000002c0| 71 75 6f 74 65 64 2d 63 | 68 61 72 20 30 5d 20 34 |quoted-c|har 0] 4|
|000002d0| 29 29 0a 0a 28 64 65 66 | 75 6e 20 64 65 6c 65 74 |))..(def|un delet|
|000002e0| 65 2d 69 6e 64 65 6e 74 | 61 74 69 6f 6e 20 28 26 |e-indent|ation (&|
|000002f0| 6f 70 74 69 6f 6e 61 6c | 20 61 72 67 29 20 22 5c |optional| arg) "\|
|00000300| 0a 4a 6f 69 6e 20 74 68 | 69 73 20 6c 69 6e 65 20 |.Join th|is line |
|00000310| 74 6f 20 70 72 65 76 69 | 6f 75 73 20 61 6e 64 20 |to previ|ous and |
|00000320| 66 69 78 20 75 70 20 77 | 68 69 74 65 73 70 61 63 |fix up w|hitespac|
|00000330| 65 20 61 74 20 6a 6f 69 | 6e 2e 0a 57 69 74 68 20 |e at joi|n..With |
|00000340| 61 72 67 75 6d 65 6e 74 | 2c 20 6a 6f 69 6e 20 74 |argument|, join t|
|00000350| 68 69 73 20 6c 69 6e 65 | 20 74 6f 20 66 6f 6c 6c |his line| to foll|
|00000360| 6f 77 69 6e 67 20 6c 69 | 6e 65 2e 22 20 28 69 6e |owing li|ne." (in|
|00000370| 74 65 72 61 63 74 69 76 | 65 20 22 2a 50 22 29 20 |teractiv|e "*P") |
|00000380| 28 62 79 74 65 2d 63 6f | 64 65 20 22 c1 88 c2 20 |(byte-co|de "... |
|00000390| 88 08 85 0c 00 c3 c4 21 | 88 68 c5 3d 85 1b 00 c6 |.......!|.h.=....|
|000003a0| 60 60 53 5c 22 88 c7 20 | 87 22 20 5b 61 72 67 20 |``S\".. |." [arg |
|000003b0| 6e 69 6c 20 62 65 67 69 | 6e 6e 69 6e 67 2d 6f 66 |nil begi|nning-of|
|000003c0| 2d 6c 69 6e 65 20 66 6f | 72 77 61 72 64 2d 6c 69 |-line fo|rward-li|
|000003d0| 6e 65 20 31 20 31 30 20 | 64 65 6c 65 74 65 2d 72 |ne 1 10 |delete-r|
|000003e0| 65 67 69 6f 6e 20 66 69 | 78 75 70 2d 77 68 69 74 |egion fi|xup-whit|
|000003f0| 65 73 70 61 63 65 5d 20 | 35 29 29 0a 0a 28 64 65 |espace] |5))..(de|
|00000400| 66 75 6e 20 66 69 78 75 | 70 2d 77 68 69 74 65 73 |fun fixu|p-whites|
|00000410| 70 61 63 65 20 6e 69 6c | 20 22 5c 0a 46 69 78 75 |pace nil| "\.Fixu|
|00000420| 70 20 77 68 69 74 65 20 | 73 70 61 63 65 20 62 65 |p white |space be|
|00000430| 74 77 65 65 6e 20 6f 62 | 6a 65 63 74 73 20 61 72 |tween ob|jects ar|
|00000440| 6f 75 6e 64 20 70 6f 69 | 6e 74 2e 0a 4c 65 61 76 |ound poi|nt..Leav|
|00000450| 65 20 6f 6e 65 20 73 70 | 61 63 65 20 6f 72 20 6e |e one sp|ace or n|
|00000460| 6f 6e 65 2c 20 61 63 63 | 6f 72 64 69 6e 67 20 74 |one, acc|ording t|
|00000470| 6f 20 74 68 65 20 63 6f | 6e 74 65 78 74 2e 22 20 |o the co|ntext." |
|00000480| 28 69 6e 74 65 72 61 63 | 74 69 76 65 20 22 2a 22 |(interac|tive "*"|
|00000490| 29 20 28 62 79 74 65 2d | 63 6f 64 65 20 22 c0 88 |) (byte-|code "..|
|000004a0| 8a c1 20 88 c2 c3 21 86 | 15 00 8a c4 c5 21 88 c2 |.. ...!.|.....!..|
|000004b0| c6 21 29 83 1c 00 c0 82 | 1e 00 c7 63 29 87 22 20 |.!).....|...c)." |
|000004c0| 5b 6e 69 6c 20 64 65 6c | 65 74 65 2d 68 6f 72 69 |[nil del|ete-hori|
|000004d0| 7a 6f 6e 74 61 6c 2d 73 | 70 61 63 65 20 6c 6f 6f |zontal-s|pace loo|
|000004e0| 6b 69 6e 67 2d 61 74 20 | 22 5e 5c 5c 7c 5c 5c 73 |king-at |"^\\|\\s|
|000004f0| 29 22 20 66 6f 72 77 61 | 72 64 2d 63 68 61 72 20 |)" forwa|rd-char |
|00000500| 2d 31 20 22 24 5c 5c 7c | 5c 5c 73 28 5c 5c 7c 5c |-1 "$\\||\\s(\\|\|
|00000510| 5c 73 27 22 20 33 32 5d | 20 35 29 29 0a 0a 28 64 |\s'" 32]| 5))..(d|
|00000520| 65 66 75 6e 20 64 65 6c | 65 74 65 2d 68 6f 72 69 |efun del|ete-hori|
|00000530| 7a 6f 6e 74 61 6c 2d 73 | 70 61 63 65 20 6e 69 6c |zontal-s|pace nil|
|00000540| 20 22 5c 0a 44 65 6c 65 | 74 65 20 61 6c 6c 20 73 | "\.Dele|te all s|
|00000550| 70 61 63 65 73 20 61 6e | 64 20 74 61 62 73 20 61 |paces an|d tabs a|
|00000560| 72 6f 75 6e 64 20 70 6f | 69 6e 74 2e 22 20 28 69 |round po|int." (i|
|00000570| 6e 74 65 72 61 63 74 69 | 76 65 20 22 2a 22 29 20 |nteracti|ve "*") |
|00000580| 28 62 79 74 65 2d 63 6f | 64 65 20 22 c0 88 c1 c2 |(byte-co|de "....|
|00000590| 21 88 c3 60 c4 c2 21 88 | 60 5c 22 87 22 20 5b 6e |!..`..!.|`\"." [n|
|000005a0| 69 6c 20 73 6b 69 70 2d | 63 68 61 72 73 2d 62 61 |il skip-|chars-ba|
|000005b0| 63 6b 77 61 72 64 20 22 | 20 09 22 20 64 65 6c 65 |ckward "| ." dele|
|000005c0| 74 65 2d 72 65 67 69 6f | 6e 20 73 6b 69 70 2d 63 |te-regio|n skip-c|
|000005d0| 68 61 72 73 2d 66 6f 72 | 77 61 72 64 5d 20 35 29 |hars-for|ward] 5)|
|000005e0| 29 0a 0a 28 64 65 66 75 | 6e 20 6a 75 73 74 2d 6f |)..(defu|n just-o|
|000005f0| 6e 65 2d 73 70 61 63 65 | 20 6e 69 6c 20 22 5c 0a |ne-space| nil "\.|
|00000600| 44 65 6c 65 74 65 20 61 | 6c 6c 20 73 70 61 63 65 |Delete a|ll space|
|00000610| 73 20 61 6e 64 20 74 61 | 62 73 20 61 72 6f 75 6e |s and ta|bs aroun|
|00000620| 64 20 70 6f 69 6e 74 2c | 20 6c 65 61 76 69 6e 67 |d point,| leaving|
|00000630| 20 6f 6e 65 20 73 70 61 | 63 65 2e 22 20 28 69 6e | one spa|ce." (in|
|00000640| 74 65 72 61 63 74 69 76 | 65 20 22 2a 22 29 20 28 |teractiv|e "*") (|
|00000650| 62 79 74 65 2d 63 6f 64 | 65 20 22 c0 88 c1 c2 21 |byte-cod|e "....!|
|00000660| 88 67 c3 55 83 12 00 c4 | c5 21 82 14 00 c3 63 88 |.g.U....|.!....c.|
|00000670| c6 60 c7 c2 21 88 60 5c | 22 87 22 20 5b 6e 69 6c |.`..!.`\|"." [nil|
|00000680| 20 73 6b 69 70 2d 63 68 | 61 72 73 2d 62 61 63 6b | skip-ch|ars-back|
|00000690| 77 61 72 64 20 22 20 09 | 22 20 33 32 20 66 6f 72 |ward " .|" 32 for|
|000006a0| 77 61 72 64 2d 63 68 61 | 72 20 31 20 64 65 6c 65 |ward-cha|r 1 dele|
|000006b0| 74 65 2d 72 65 67 69 6f | 6e 20 73 6b 69 70 2d 63 |te-regio|n skip-c|
|000006c0| 68 61 72 73 2d 66 6f 72 | 77 61 72 64 5d 20 36 29 |hars-for|ward] 6)|
|000006d0| 29 0a 0a 28 64 65 66 75 | 6e 20 64 65 6c 65 74 65 |)..(defu|n delete|
|000006e0| 2d 62 6c 61 6e 6b 2d 6c | 69 6e 65 73 20 6e 69 6c |-blank-l|ines nil|
|000006f0| 20 22 5c 0a 4f 6e 20 62 | 6c 61 6e 6b 20 6c 69 6e | "\.On b|lank lin|
|00000700| 65 2c 20 64 65 6c 65 74 | 65 20 61 6c 6c 20 73 75 |e, delet|e all su|
|00000710| 72 72 6f 75 6e 64 69 6e | 67 20 62 6c 61 6e 6b 20 |rroundin|g blank |
|00000720| 6c 69 6e 65 73 2c 20 6c | 65 61 76 69 6e 67 20 6a |lines, l|eaving j|
|00000730| 75 73 74 20 6f 6e 65 2e | 0a 4f 6e 20 69 73 6f 6c |ust one.|.On isol|
|00000740| 61 74 65 64 20 62 6c 61 | 6e 6b 20 6c 69 6e 65 2c |ated bla|nk line,|
|00000750| 20 64 65 6c 65 74 65 20 | 74 68 61 74 20 6f 6e 65 | delete |that one|
|00000760| 2e 0a 4f 6e 20 6e 6f 6e | 62 6c 61 6e 6b 20 6c 69 |..On non|blank li|
|00000770| 6e 65 2c 20 64 65 6c 65 | 74 65 20 61 6c 6c 20 62 |ne, dele|te all b|
|00000780| 6c 61 6e 6b 20 6c 69 6e | 65 73 20 74 68 61 74 20 |lank lin|es that |
|00000790| 66 6f 6c 6c 6f 77 20 69 | 74 2e 22 20 28 69 6e 74 |follow i|t." (int|
|000007a0| 65 72 61 63 74 69 76 65 | 20 22 2a 22 29 20 28 62 |eractive| "*") (b|
|000007b0| 79 74 65 2d 63 6f 64 65 | 20 22 c2 88 c2 c2 19 18 |yte-code| "......|
|000007c0| 8a c4 20 88 c5 c6 21 89 | 10 88 08 85 27 00 c5 c7 |.. ...!.|....'...|
|000007d0| 21 3f 85 27 00 6f 86 27 | 00 c8 c9 21 88 c5 c6 21 |!?.'.o.'|...!...!|
|000007e0| 3f 89 11 29 88 08 85 4e | 00 c4 20 88 09 85 39 00 |?..)...N|.. ...9.|
|000007f0| c8 ca 21 88 cb 60 cc cd | c2 c3 23 83 4c 00 c8 ca |..!..`..|..#.L...|
|00000800| 21 88 60 82 4d 00 65 5c | 22 88 08 85 54 00 09 3f |!.`.M.e\|"...T..?|
|00000810| 85 74 00 8a ce 20 88 c8 | ca 21 88 cb 60 cf cd c2 |.t... ..|.!..`...|
|00000820| c3 23 83 71 00 c4 20 88 | 60 82 72 00 64 5c 22 29 |.#.q.. .|`.r.d\")|
|00000830| 2a 87 22 20 5b 74 68 69 | 73 62 6c 61 6e 6b 20 73 |*." [thi|sblank s|
|00000840| 69 6e 67 6c 65 62 6c 61 | 6e 6b 20 6e 69 6c 20 74 |inglebla|nk nil t|
|00000850| 20 62 65 67 69 6e 6e 69 | 6e 67 2d 6f 66 2d 6c 69 | beginni|ng-of-li|
|00000860| 6e 65 20 6c 6f 6f 6b 69 | 6e 67 2d 61 74 20 22 5b |ne looki|ng-at "[|
|00000870| 20 09 5d 2a 24 22 20 22 | 5b 20 09 5d 2a 0a 5b 20 | .]*$" "|[ .]*.[ |
|00000880| 09 5d 2a 24 22 20 66 6f | 72 77 61 72 64 2d 6c 69 |.]*$" fo|rward-li|
|00000890| 6e 65 20 2d 31 20 31 20 | 64 65 6c 65 74 65 2d 72 |ne -1 1 |delete-r|
|000008a0| 65 67 69 6f 6e 20 72 65 | 2d 73 65 61 72 63 68 2d |egion re|-search-|
|000008b0| 62 61 63 6b 77 61 72 64 | 20 22 5b 5e 20 09 0a 5d |backward| "[^ ..]|
|000008c0| 22 20 65 6e 64 2d 6f 66 | 2d 6c 69 6e 65 20 72 65 |" end-of|-line re|
|000008d0| 2d 73 65 61 72 63 68 2d | 66 6f 72 77 61 72 64 5d |-search-|forward]|
|000008e0| 20 31 38 29 29 0a 0a 28 | 64 65 66 75 6e 20 62 61 | 18))..(|defun ba|
|000008f0| 63 6b 2d 74 6f 2d 69 6e | 64 65 6e 74 61 74 69 6f |ck-to-in|dentatio|
|00000900| 6e 20 6e 69 6c 20 22 5c | 0a 4d 6f 76 65 20 70 6f |n nil "\|.Move po|
|00000910| 69 6e 74 20 74 6f 20 74 | 68 65 20 66 69 72 73 74 |int to t|he first|
|00000920| 20 6e 6f 6e 2d 77 68 69 | 74 65 73 70 61 63 65 20 | non-whi|tespace |
|00000930| 63 68 61 72 61 63 74 65 | 72 20 6f 6e 20 74 68 69 |characte|r on thi|
|00000940| 73 20 6c 69 6e 65 2e 22 | 20 28 69 6e 74 65 72 61 |s line."| (intera|
|00000950| 63 74 69 76 65 29 20 28 | 62 79 74 65 2d 63 6f 64 |ctive) (|byte-cod|
|00000960| 65 20 22 c0 88 c1 c2 21 | 88 c3 c4 21 87 22 20 5b |e "....!|...!." [|
|00000970| 6e 69 6c 20 62 65 67 69 | 6e 6e 69 6e 67 2d 6f 66 |nil begi|nning-of|
|00000980| 2d 6c 69 6e 65 20 31 20 | 73 6b 69 70 2d 63 68 61 |-line 1 |skip-cha|
|00000990| 72 73 2d 66 6f 72 77 61 | 72 64 20 22 20 09 22 5d |rs-forwa|rd " ."]|
|000009a0| 20 33 29 29 0a 0a 28 64 | 65 66 75 6e 20 6e 65 77 | 3))..(d|efun new|
|000009b0| 6c 69 6e 65 2d 61 6e 64 | 2d 69 6e 64 65 6e 74 20 |line-and|-indent |
|000009c0| 6e 69 6c 20 22 5c 0a 49 | 6e 73 65 72 74 20 61 20 |nil "\.I|nsert a |
|000009d0| 6e 65 77 6c 69 6e 65 2c | 20 74 68 65 6e 20 69 6e |newline,| then in|
|000009e0| 64 65 6e 74 20 61 63 63 | 6f 72 64 69 6e 67 20 74 |dent acc|ording t|
|000009f0| 6f 20 6d 61 6a 6f 72 20 | 6d 6f 64 65 2e 0a 49 6e |o major |mode..In|
|00000a00| 64 65 6e 74 61 74 69 6f | 6e 20 69 73 20 64 6f 6e |dentatio|n is don|
|00000a10| 65 20 75 73 69 6e 67 20 | 74 68 65 20 63 75 72 72 |e using |the curr|
|00000a20| 65 6e 74 20 69 6e 64 65 | 6e 74 2d 6c 69 6e 65 2d |ent inde|nt-line-|
|00000a30| 66 75 6e 63 74 69 6f 6e | 2e 0a 49 6e 20 70 72 6f |function|..In pro|
|00000a40| 67 72 61 6d 6d 69 6e 67 | 20 6c 61 6e 67 75 61 67 |gramming| languag|
|00000a50| 65 20 6d 6f 64 65 73 2c | 20 74 68 69 73 20 69 73 |e modes,| this is|
|00000a60| 20 74 68 65 20 73 61 6d | 65 20 61 73 20 54 41 42 | the sam|e as TAB|
|00000a70| 2e 0a 49 6e 20 73 6f 6d | 65 20 74 65 78 74 20 6d |..In som|e text m|
|00000a80| 6f 64 65 73 2c 20 77 68 | 65 72 65 20 54 41 42 20 |odes, wh|ere TAB |
|00000a90| 69 6e 73 65 72 74 73 20 | 61 20 74 61 62 2c 20 74 |inserts |a tab, t|
|00000aa0| 68 69 73 20 69 6e 64 65 | 6e 74 73 20 74 6f 20 74 |his inde|nts to t|
|00000ab0| 68 65 0a 73 70 65 63 69 | 66 69 65 64 20 6c 65 66 |he.speci|fied lef|
|00000ac0| 74 2d 6d 61 72 67 69 6e | 20 63 6f 6c 75 6d 6e 2e |t-margin| column.|
|00000ad0| 22 20 28 69 6e 74 65 72 | 61 63 74 69 76 65 20 22 |" (inter|active "|
|00000ae0| 2a 22 29 20 28 62 79 74 | 65 2d 63 6f 64 65 20 22 |*") (byt|e-code "|
|00000af0| c0 88 c1 60 c2 c3 21 88 | 60 5c 22 88 c4 63 88 c5 |...`..!.|`\"..c..|
|00000b00| 20 87 22 20 5b 6e 69 6c | 20 64 65 6c 65 74 65 2d | ." [nil| delete-|
|00000b10| 72 65 67 69 6f 6e 20 73 | 6b 69 70 2d 63 68 61 72 |region s|kip-char|
|00000b20| 73 2d 62 61 63 6b 77 61 | 72 64 20 22 20 09 22 20 |s-backwa|rd " ." |
|00000b30| 31 30 20 69 6e 64 65 6e | 74 2d 61 63 63 6f 72 64 |10 inden|t-accord|
|00000b40| 69 6e 67 2d 74 6f 2d 6d | 6f 64 65 5d 20 34 29 29 |ing-to-m|ode] 4))|
|00000b50| 0a 0a 28 64 65 66 75 6e | 20 72 65 69 6e 64 65 6e |..(defun| reinden|
|00000b60| 74 2d 74 68 65 6e 2d 6e | 65 77 6c 69 6e 65 2d 61 |t-then-n|ewline-a|
|00000b70| 6e 64 2d 69 6e 64 65 6e | 74 20 6e 69 6c 20 22 5c |nd-inden|t nil "\|
|00000b80| 0a 52 65 69 6e 64 65 6e | 74 20 63 75 72 72 65 6e |.Reinden|t curren|
|00000b90| 74 20 6c 69 6e 65 2c 20 | 69 6e 73 65 72 74 20 6e |t line, |insert n|
|00000ba0| 65 77 6c 69 6e 65 2c 20 | 74 68 65 6e 20 69 6e 64 |ewline, |then ind|
|00000bb0| 65 6e 74 20 74 68 65 20 | 6e 65 77 20 6c 69 6e 65 |ent the |new line|
|00000bc0| 2e 0a 49 6e 64 65 6e 74 | 61 74 69 6f 6e 20 6f 66 |..Indent|ation of|
|00000bd0| 20 62 6f 74 68 20 6c 69 | 6e 65 73 20 69 73 20 64 | both li|nes is d|
|00000be0| 6f 6e 65 20 61 63 63 6f | 72 64 69 6e 67 20 74 6f |one acco|rding to|
|00000bf0| 20 74 68 65 20 63 75 72 | 72 65 6e 74 20 6d 61 6a | the cur|rent maj|
|00000c00| 6f 72 20 6d 6f 64 65 2c | 0a 77 68 69 63 68 20 6d |or mode,|.which m|
|00000c10| 65 61 6e 73 20 74 68 61 | 74 20 74 68 65 20 63 75 |eans tha|t the cu|
|00000c20| 72 72 65 6e 74 20 76 61 | 6c 75 65 20 6f 66 20 69 |rrent va|lue of i|
|00000c30| 6e 64 65 6e 74 2d 6c 69 | 6e 65 2d 66 75 6e 63 74 |ndent-li|ne-funct|
|00000c40| 69 6f 6e 20 69 73 20 63 | 61 6c 6c 65 64 2e 0a 49 |ion is c|alled..I|
|00000c50| 6e 20 70 72 6f 67 72 61 | 6d 6d 69 6e 67 20 6c 61 |n progra|mming la|
|00000c60| 6e 67 75 61 67 65 20 6d | 6f 64 65 73 2c 20 74 68 |nguage m|odes, th|
|00000c70| 69 73 20 69 73 20 74 68 | 65 20 73 61 6d 65 20 61 |is is th|e same a|
|00000c80| 73 20 54 41 42 2e 0a 49 | 6e 20 73 6f 6d 65 20 74 |s TAB..I|n some t|
|00000c90| 65 78 74 20 6d 6f 64 65 | 73 2c 20 77 68 65 72 65 |ext mode|s, where|
|00000ca0| 20 54 41 42 20 69 6e 73 | 65 72 74 73 20 61 20 74 | TAB ins|erts a t|
|00000cb0| 61 62 2c 20 74 68 69 73 | 20 69 6e 64 65 6e 74 73 |ab, this| indents|
|00000cc0| 20 74 6f 20 74 68 65 0a | 73 70 65 63 69 66 69 65 | to the.|specifie|
|00000cd0| 64 20 6c 65 66 74 2d 6d | 61 72 67 69 6e 20 63 6f |d left-m|argin co|
|00000ce0| 6c 75 6d 6e 2e 22 20 28 | 69 6e 74 65 72 61 63 74 |lumn." (|interact|
|00000cf0| 69 76 65 20 22 2a 22 29 | 20 28 62 79 74 65 2d 63 |ive "*")| (byte-c|
|00000d00| 6f 64 65 20 22 c0 88 8a | c1 60 c2 c3 21 88 60 5c |ode "...|.`..!.`\|
|00000d10| 22 88 c4 20 29 88 c5 63 | 88 c4 20 87 22 20 5b 6e |".. )..c|.. ." [n|
|00000d20| 69 6c 20 64 65 6c 65 74 | 65 2d 72 65 67 69 6f 6e |il delet|e-region|
|00000d30| 20 73 6b 69 70 2d 63 68 | 61 72 73 2d 62 61 63 6b | skip-ch|ars-back|
|00000d40| 77 61 72 64 20 22 20 09 | 22 20 69 6e 64 65 6e 74 |ward " .|" indent|
|00000d50| 2d 61 63 63 6f 72 64 69 | 6e 67 2d 74 6f 2d 6d 6f |-accordi|ng-to-mo|
|00000d60| 64 65 20 31 30 5d 20 35 | 29 29 0a 0a 28 64 65 66 |de 10] 5|))..(def|
|00000d70| 75 6e 20 6b 69 6c 6c 2d | 66 6f 72 77 61 72 64 2d |un kill-|forward-|
|00000d80| 63 68 61 72 73 20 28 61 | 72 67 29 20 28 62 79 74 |chars (a|rg) (byt|
|00000d90| 65 2d 63 6f 64 65 20 22 | 08 3c 85 09 00 08 40 89 |e-code "|.<....@.|
|00000da0| 10 88 08 c1 3d 85 13 00 | c2 89 10 88 c3 60 60 08 |....=...|.....``.|
|00000db0| 5c 5c 5c 22 87 22 20 5b | 61 72 67 20 2d 20 2d 31 |\\\"." [|arg - -1|
|00000dc0| 20 6b 69 6c 6c 2d 72 65 | 67 69 6f 6e 5d 20 34 29 | kill-re|gion] 4)|
|00000dd0| 29 0a 0a 28 64 65 66 75 | 6e 20 6b 69 6c 6c 2d 62 |)..(defu|n kill-b|
|00000de0| 61 63 6b 77 61 72 64 2d | 63 68 61 72 73 20 28 61 |ackward-|chars (a|
|00000df0| 72 67 29 20 28 62 79 74 | 65 2d 63 6f 64 65 20 22 |rg) (byt|e-code "|
|00000e00| 08 3c 85 09 00 08 40 89 | 10 88 08 c1 3d 85 13 00 |.<....@.|....=...|
|00000e10| c2 89 10 88 c3 60 60 08 | 5a 5c 22 87 22 20 5b 61 |.....``.|Z\"." [a|
|00000e20| 72 67 20 2d 20 2d 31 20 | 6b 69 6c 6c 2d 72 65 67 |rg - -1 |kill-reg|
|00000e30| 69 6f 6e 5d 20 34 29 29 | 0a 0a 28 64 65 66 75 6e |ion] 4))|..(defun|
|00000e40| 20 62 61 63 6b 77 61 72 | 64 2d 64 65 6c 65 74 65 | backwar|d-delete|
|00000e50| 2d 63 68 61 72 2d 75 6e | 74 61 62 69 66 79 20 28 |-char-un|tabify (|
|00000e60| 61 72 67 20 26 6f 70 74 | 69 6f 6e 61 6c 20 6b 69 |arg &opt|ional ki|
|00000e70| 6c 6c 70 29 20 22 5c 0a | 44 65 6c 65 74 65 20 63 |llp) "\.|Delete c|
|00000e80| 68 61 72 61 63 74 65 72 | 73 20 62 61 63 6b 77 61 |haracter|s backwa|
|00000e90| 72 64 2c 20 63 68 61 6e | 67 69 6e 67 20 74 61 62 |rd, chan|ging tab|
|00000ea0| 73 20 69 6e 74 6f 20 73 | 70 61 63 65 73 2e 0a 44 |s into s|paces..D|
|00000eb0| 65 6c 65 74 65 20 41 52 | 47 20 63 68 61 72 73 2c |elete AR|G chars,|
|00000ec0| 20 61 6e 64 20 6b 69 6c | 6c 20 28 73 61 76 65 20 | and kil|l (save |
|00000ed0| 69 6e 20 6b 69 6c 6c 20 | 72 69 6e 67 29 20 69 66 |in kill |ring) if|
|00000ee0| 20 4b 49 4c 4c 50 20 69 | 73 20 6e 6f 6e 2d 6e 69 | KILLP i|s non-ni|
|00000ef0| 6c 2e 0a 49 6e 74 65 72 | 61 63 74 69 76 65 6c 79 |l..Inter|actively|
|00000f00| 2c 20 41 52 47 20 69 73 | 20 74 68 65 20 70 72 65 |, ARG is| the pre|
|00000f10| 66 69 78 20 61 72 67 20 | 28 64 65 66 61 75 6c 74 |fix arg |(default|
|00000f20| 20 31 29 0a 61 6e 64 20 | 4b 49 4c 4c 50 20 69 73 | 1).and |KILLP is|
|00000f30| 20 74 20 69 66 20 70 72 | 65 66 69 78 20 61 72 67 | t if pr|efix arg|
|00000f40| 20 69 73 20 77 61 73 20 | 73 70 65 63 69 66 69 65 | is was |specifie|
|00000f50| 64 2e 22 20 28 69 6e 74 | 65 72 61 63 74 69 76 65 |d." (int|eractive|
|00000f60| 20 22 2a 70 0a 50 22 29 | 20 28 62 79 74 65 2d 63 | "*p.P")| (byte-c|
|00000f70| 6f 64 65 20 22 c4 88 09 | 18 8a 08 c5 56 85 0d 00 |ode "...|....V...|
|00000f80| 6f 3f 85 38 00 68 c6 55 | 85 2b 00 69 1a c7 c8 21 |o?.8.h.U|.+.i...!|
|00000f90| 88 0a 69 5a 89 12 88 c9 | ca 0a 5c 22 88 cb cc 21 |..iZ....|..\"...!|
|00000fa0| 29 88 c7 c8 21 88 08 53 | 89 10 88 82 05 00 29 29 |)...!..S|......))|
|00000fb0| 88 cd 09 0b 5c 22 87 22 | 20 5b 63 6f 75 6e 74 20 |....\"."| [count |
|00000fc0| 61 72 67 20 63 6f 6c 20 | 6b 69 6c 6c 70 20 6e 69 |arg col |killp ni|
|00000fd0| 6c 20 30 20 39 20 66 6f | 72 77 61 72 64 2d 63 68 |l 0 9 fo|rward-ch|
|00000fe0| 61 72 20 2d 31 20 69 6e | 73 65 72 74 2d 63 68 61 |ar -1 in|sert-cha|
|00000ff0| 72 20 33 32 20 64 65 6c | 65 74 65 2d 63 68 61 72 |r 32 del|ete-char|
|00001000| 20 31 20 64 65 6c 65 74 | 65 2d 62 61 63 6b 77 61 | 1 delet|e-backwa|
|00001010| 72 64 2d 63 68 61 72 5d | 20 37 29 29 0a 0a 28 64 |rd-char]| 7))..(d|
|00001020| 65 66 75 6e 20 7a 61 70 | 2d 74 6f 2d 63 68 61 72 |efun zap|-to-char|
|00001030| 20 28 61 72 67 20 63 68 | 61 72 29 20 22 5c 0a 4b | (arg ch|ar) "\.K|
|00001040| 69 6c 6c 20 75 70 20 74 | 6f 20 28 62 75 74 20 6e |ill up t|o (but n|
|00001050| 6f 74 20 69 6e 63 6c 75 | 64 69 6e 67 29 20 41 52 |ot inclu|ding) AR|
|00001060| 47 27 74 68 20 6f 63 63 | 75 72 72 65 6e 63 65 20 |G'th occ|urrence |
|00001070| 6f 66 20 43 48 41 52 2e | 0a 47 6f 65 73 20 62 61 |of CHAR.|.Goes ba|
|00001080| 63 6b 77 61 72 64 20 69 | 66 20 41 52 47 20 69 73 |ckward i|f ARG is|
|00001090| 20 6e 65 67 61 74 69 76 | 65 3b 20 67 6f 65 73 20 | negativ|e; goes |
|000010a0| 74 6f 20 65 6e 64 20 6f | 66 20 62 75 66 66 65 72 |to end o|f buffer|
|000010b0| 20 69 66 20 43 48 41 52 | 20 6e 6f 74 20 66 6f 75 | if CHAR| not fou|
|000010c0| 6e 64 2e 22 20 28 69 6e | 74 65 72 61 63 74 69 76 |nd." (in|teractiv|
|000010d0| 65 20 22 2a 70 0a 63 5a | 61 70 20 74 6f 20 63 68 |e "*p.cZ|ap to ch|
|000010e0| 61 72 3a 20 22 29 20 28 | 62 79 74 65 2d 63 6f 64 |ar: ") (|byte-cod|
|000010f0| 65 20 22 c1 88 c4 60 c5 | c6 08 21 c1 c2 0b 24 83 |e "...`.|..!...$.|
|00001100| 5c 22 00 0b c7 56 83 1a | 00 60 53 82 1c 00 60 54 |\"...V..|.`S...`T|
|00001110| 62 88 60 82 2d 00 0b c7 | 56 83 2c 00 64 82 2d 00 |b.`.-...|V.,.d.-.|
|00001120| 65 5c 22 87 22 20 5b 63 | 68 61 72 20 6e 69 6c 20 |e\"." [c|har nil |
|00001130| 74 20 61 72 67 20 6b 69 | 6c 6c 2d 72 65 67 69 6f |t arg ki|ll-regio|
|00001140| 6e 20 73 65 61 72 63 68 | 2d 66 6f 72 77 61 72 64 |n search|-forward|
|00001150| 20 63 68 61 72 2d 74 6f | 2d 73 74 72 69 6e 67 20 | char-to|-string |
|00001160| 30 5d 20 38 29 29 0a 0a | 28 64 65 66 75 6e 20 62 |0] 8))..|(defun b|
|00001170| 65 67 69 6e 6e 69 6e 67 | 2d 6f 66 2d 62 75 66 66 |eginning|-of-buff|
|00001180| 65 72 20 28 26 6f 70 74 | 69 6f 6e 61 6c 20 61 72 |er (&opt|ional ar|
|00001190| 67 29 20 22 5c 0a 4d 6f | 76 65 20 70 6f 69 6e 74 |g) "\.Mo|ve point|
|000011a0| 20 74 6f 20 74 68 65 20 | 62 65 67 69 6e 6e 69 6e | to the |beginnin|
|000011b0| 67 20 6f 66 20 74 68 65 | 20 62 75 66 66 65 72 3b |g of the| buffer;|
|000011c0| 20 6c 65 61 76 65 20 6d | 61 72 6b 20 61 74 20 70 | leave m|ark at p|
|000011d0| 72 65 76 69 6f 75 73 20 | 70 6f 73 69 74 69 6f 6e |revious |position|
|000011e0| 2e 0a 57 69 74 68 20 61 | 72 67 20 4e 2c 20 70 75 |..With a|rg N, pu|
|000011f0| 74 20 70 6f 69 6e 74 20 | 4e 2f 31 30 20 6f 66 20 |t point |N/10 of |
|00001200| 74 68 65 20 77 61 79 20 | 66 72 6f 6d 20 74 68 65 |the way |from the|
|00001210| 20 74 72 75 65 20 62 65 | 67 69 6e 6e 69 6e 67 2e | true be|ginning.|
|00001220| 0a 44 6f 6e 27 74 20 75 | 73 65 20 74 68 69 73 20 |.Don't u|se this |
|00001230| 69 6e 20 4c 69 73 70 20 | 70 72 6f 67 72 61 6d 73 |in Lisp |programs|
|00001240| 21 0a 28 67 6f 74 6f 2d | 63 68 61 72 20 28 70 6f |!.(goto-|char (po|
|00001250| 69 6e 74 2d 6d 69 6e 29 | 29 20 69 73 20 66 61 73 |int-min)|) is fas|
|00001260| 74 65 72 20 61 6e 64 20 | 64 6f 65 73 20 6e 6f 74 |ter and |does not|
|00001270| 20 73 65 74 20 74 68 65 | 20 6d 61 72 6b 2e 22 20 | set the| mark." |
|00001280| 28 69 6e 74 65 72 61 63 | 74 69 76 65 20 22 50 22 |(interac|tive "P"|
|00001290| 29 20 28 62 79 74 65 2d | 63 6f 64 65 20 22 c1 88 |) (byte-|code "..|
|000012a0| c2 20 88 08 83 2c 00 c3 | 20 c4 56 83 1d 00 c5 c6 |. ...,..| .V.....|
|000012b0| 08 21 c7 c3 20 c8 5c 22 | 5c 22 82 29 00 c7 c8 c5 |.!.. .\"|\".)....|
|000012c0| c3 20 c6 08 21 5c 22 5c | 5c c8 5c 22 82 2d 00 65 |. ..!\"\|\.\".-.e|
|000012d0| 62 88 08 85 36 00 c9 ca | 21 87 22 20 5b 61 72 67 |b...6...|!." [arg|
|000012e0| 20 6e 69 6c 20 70 75 73 | 68 2d 6d 61 72 6b 20 62 | nil pus|h-mark b|
|000012f0| 75 66 66 65 72 2d 73 69 | 7a 65 20 31 30 30 30 30 |uffer-si|ze 10000|
|00001300| 20 2a 20 70 72 65 66 69 | 78 2d 6e 75 6d 65 72 69 | * prefi|x-numeri|
|00001310| 63 2d 76 61 6c 75 65 20 | 2f 20 31 30 20 66 6f 72 |c-value |/ 10 for|
|00001320| 77 61 72 64 2d 6c 69 6e | 65 20 31 5d 20 31 33 29 |ward-lin|e 1] 13)|
|00001330| 29 0a 0a 28 64 65 66 75 | 6e 20 65 6e 64 2d 6f 66 |)..(defu|n end-of|
|00001340| 2d 62 75 66 66 65 72 20 | 28 26 6f 70 74 69 6f 6e |-buffer |(&option|
|00001350| 61 6c 20 61 72 67 29 20 | 22 5c 0a 4d 6f 76 65 20 |al arg) |"\.Move |
|00001360| 70 6f 69 6e 74 20 74 6f | 20 74 68 65 20 65 6e 64 |point to| the end|
|00001370| 20 6f 66 20 74 68 65 20 | 62 75 66 66 65 72 3b 20 | of the |buffer; |
|00001380| 6c 65 61 76 65 20 6d 61 | 72 6b 20 61 74 20 70 72 |leave ma|rk at pr|
|00001390| 65 76 69 6f 75 73 20 70 | 6f 73 69 74 69 6f 6e 2e |evious p|osition.|
|000013a0| 0a 57 69 74 68 20 61 72 | 67 20 4e 2c 20 70 75 74 |.With ar|g N, put|
|000013b0| 20 70 6f 69 6e 74 20 4e | 2f 31 30 20 6f 66 20 74 | point N|/10 of t|
|000013c0| 68 65 20 77 61 79 20 66 | 72 6f 6d 20 74 68 65 20 |he way f|rom the |
|000013d0| 74 72 75 65 20 65 6e 64 | 2e 0a 44 6f 6e 27 74 20 |true end|..Don't |
|000013e0| 75 73 65 20 74 68 69 73 | 20 69 6e 20 4c 69 73 70 |use this| in Lisp|
|000013f0| 20 70 72 6f 67 72 61 6d | 73 21 0a 28 67 6f 74 6f | program|s!.(goto|
|00001400| 2d 63 68 61 72 20 28 70 | 6f 69 6e 74 2d 6d 61 78 |-char (p|oint-max|
|00001410| 29 29 20 69 73 20 66 61 | 73 74 65 72 20 61 6e 64 |)) is fa|ster and|
|00001420| 20 64 6f 65 73 20 6e 6f | 74 20 73 65 74 20 74 68 | does no|t set th|
|00001430| 65 20 6d 61 72 6b 2e 22 | 20 28 69 6e 74 65 72 61 |e mark."| (intera|
|00001440| 63 74 69 76 65 20 22 50 | 22 29 20 28 62 79 74 65 |ctive "P|") (byte|
|00001450| 2d 63 6f 64 65 20 22 c1 | 88 c2 20 88 08 83 2e 00 |-code ".|.. .....|
|00001460| c3 20 54 c3 20 c4 56 83 | 20 00 c5 c6 08 21 c7 c3 |. T. .V.| ....!..|
|00001470| 20 c8 5c 22 5c 22 82 2a | 00 c7 c5 c3 20 c6 08 21 | .\"\".*|.... ..!|
|00001480| 5c 22 c8 5c 22 5a 82 2f | 00 64 62 88 08 85 38 00 |\".\"Z./|.db...8.|
|00001490| c9 ca 21 87 22 20 5b 61 | 72 67 20 6e 69 6c 20 70 |..!." [a|rg nil p|
|000014a0| 75 73 68 2d 6d 61 72 6b | 20 62 75 66 66 65 72 2d |ush-mark| buffer-|
|000014b0| 73 69 7a 65 20 31 30 30 | 30 30 20 2a 20 70 72 65 |size 100|00 * pre|
|000014c0| 66 69 78 2d 6e 75 6d 65 | 72 69 63 2d 76 61 6c 75 |fix-nume|ric-valu|
|000014d0| 65 20 2f 20 31 30 20 66 | 6f 72 77 61 72 64 2d 6c |e / 10 f|orward-l|
|000014e0| 69 6e 65 20 31 5d 20 31 | 34 29 29 0a 0a 28 64 65 |ine 1] 1|4))..(de|
|000014f0| 66 75 6e 20 6d 61 72 6b | 2d 77 68 6f 6c 65 2d 62 |fun mark|-whole-b|
|00001500| 75 66 66 65 72 20 6e 69 | 6c 20 22 5c 0a 50 75 74 |uffer ni|l "\.Put|
|00001510| 20 70 6f 69 6e 74 20 61 | 74 20 62 65 67 69 6e 6e | point a|t beginn|
|00001520| 69 6e 67 20 61 6e 64 20 | 6d 61 72 6b 20 61 74 20 |ing and |mark at |
|00001530| 65 6e 64 20 6f 66 20 62 | 75 66 66 65 72 2e 22 20 |end of b|uffer." |
|00001540| 28 69 6e 74 65 72 61 63 | 74 69 76 65 29 20 28 62 |(interac|tive) (b|
|00001550| 79 74 65 2d 63 6f 64 65 | 20 22 c0 88 c1 60 21 88 |yte-code| "...`!.|
|00001560| c1 64 21 88 65 62 87 22 | 20 5b 6e 69 6c 20 70 75 |.d!.eb."| [nil pu|
|00001570| 73 68 2d 6d 61 72 6b 5d | 20 33 29 29 0a 0a 28 64 |sh-mark]| 3))..(d|
|00001580| 65 66 75 6e 20 63 6f 75 | 6e 74 2d 6c 69 6e 65 73 |efun cou|nt-lines|
|00001590| 2d 72 65 67 69 6f 6e 20 | 28 73 74 61 72 74 20 65 |-region |(start e|
|000015a0| 6e 64 29 20 22 5c 0a 50 | 72 69 6e 74 20 6e 75 6d |nd) "\.P|rint num|
|000015b0| 62 65 72 20 6f 66 20 6c | 69 6e 65 73 20 69 6e 20 |ber of l|ines in |
|000015c0| 74 68 65 20 72 65 67 69 | 6f 6e 2e 22 20 28 69 6e |the regi|on." (in|
|000015d0| 74 65 72 61 63 74 69 76 | 65 20 22 72 22 29 20 28 |teractiv|e "r") (|
|000015e0| 62 79 74 65 2d 63 6f 64 | 65 20 22 c2 88 c3 c4 c5 |byte-cod|e ".....|
|000015f0| 08 09 5c 22 5c 22 87 22 | 20 5b 73 74 61 72 74 20 |..\"\"."| [start |
|00001600| 65 6e 64 20 6e 69 6c 20 | 6d 65 73 73 61 67 65 20 |end nil |message |
|00001610| 22 52 65 67 69 6f 6e 20 | 68 61 73 20 25 64 20 6c |"Region |has %d l|
|00001620| 69 6e 65 73 22 20 63 6f | 75 6e 74 2d 6c 69 6e 65 |ines" co|unt-line|
|00001630| 73 5d 20 35 29 29 0a 0a | 28 64 65 66 75 6e 20 77 |s] 5))..|(defun w|
|00001640| 68 61 74 2d 6c 69 6e 65 | 20 6e 69 6c 20 22 5c 0a |hat-line| nil "\.|
|00001650| 50 72 69 6e 74 20 74 68 | 65 20 63 75 72 72 65 6e |Print th|e curren|
|00001660| 74 20 6c 69 6e 65 20 6e | 75 6d 62 65 72 20 28 69 |t line n|umber (i|
|00001670| 6e 20 74 68 65 20 62 75 | 66 66 65 72 29 20 6f 66 |n the bu|ffer) of|
|00001680| 20 70 6f 69 6e 74 2e 22 | 20 28 69 6e 74 65 72 61 | point."| (intera|
|00001690| 63 74 69 76 65 29 20 28 | 62 79 74 65 2d 63 6f 64 |ctive) (|byte-cod|
|000016a0| 65 20 22 c0 88 8c c1 20 | 88 8a c2 20 88 c3 c4 c5 |e ".... |... ....|
|000016b0| c6 60 5c 22 54 5c 22 29 | 29 87 22 20 5b 6e 69 6c |.`\"T\")|)." [nil|
|000016c0| 20 77 69 64 65 6e 20 62 | 65 67 69 6e 6e 69 6e 67 | widen b|eginning|
|000016d0| 2d 6f 66 2d 6c 69 6e 65 | 20 6d 65 73 73 61 67 65 |-of-line| message|
|000016e0| 20 22 4c 69 6e 65 20 25 | 64 22 20 63 6f 75 6e 74 | "Line %|d" count|
|000016f0| 2d 6c 69 6e 65 73 20 31 | 5d 20 37 29 29 0a 0a 28 |-lines 1|] 7))..(|
|00001700| 64 65 66 75 6e 20 63 6f | 75 6e 74 2d 6c 69 6e 65 |defun co|unt-line|
|00001710| 73 20 28 73 74 61 72 74 | 20 65 6e 64 29 20 22 5c |s (start| end) "\|
|00001720| 0a 52 65 74 75 72 6e 20 | 6e 75 6d 62 65 72 20 6f |.Return |number o|
|00001730| 66 20 6e 65 77 6c 69 6e | 65 73 20 62 65 74 77 65 |f newlin|es betwe|
|00001740| 65 6e 20 53 54 41 52 54 | 20 61 6e 64 20 45 4e 44 |en START| and END|
|00001750| 2e 22 20 28 62 79 74 65 | 2d 63 6f 64 65 20 22 8a |." (byte|-code ".|
|00001760| 8c c2 08 09 5c 22 88 65 | 62 88 c3 20 c4 c3 20 21 |....\".e|b.. .. !|
|00001770| 5a 29 29 87 22 20 5b 73 | 74 61 72 74 20 65 6e 64 |Z))." [s|tart end|
|00001780| 20 6e 61 72 72 6f 77 2d | 74 6f 2d 72 65 67 69 6f | narrow-|to-regio|
|00001790| 6e 20 62 75 66 66 65 72 | 2d 73 69 7a 65 20 66 6f |n buffer|-size fo|
|000017a0| 72 77 61 72 64 2d 6c 69 | 6e 65 5d 20 36 29 29 0a |rward-li|ne] 6)).|
|000017b0| 0a 28 64 65 66 75 6e 20 | 77 68 61 74 2d 63 75 72 |.(defun |what-cur|
|000017c0| 73 6f 72 2d 70 6f 73 69 | 74 69 6f 6e 20 6e 69 6c |sor-posi|tion nil|
|000017d0| 20 22 5c 0a 50 72 69 6e | 74 20 69 6e 66 6f 20 6f | "\.Prin|t info o|
|000017e0| 6e 20 63 75 72 73 6f 72 | 20 70 6f 73 69 74 69 6f |n cursor| positio|
|000017f0| 6e 20 28 6f 6e 20 73 63 | 72 65 65 6e 20 61 6e 64 |n (on sc|reen and|
|00001800| 20 77 69 74 68 69 6e 20 | 62 75 66 66 65 72 29 2e | within |buffer).|
|00001810| 22 20 28 69 6e 74 65 72 | 61 63 74 69 76 65 29 20 |" (inter|active) |
|00001820| 28 62 79 74 65 2d 63 6f | 64 65 20 22 c8 88 67 18 |(byte-co|de "..g.|
|00001830| 65 19 64 1a 60 1b c9 20 | 1c 0c ca 56 83 25 00 cb |e.d.`.. |...V.%..|
|00001840| cb 0c cc 5c 22 0b 53 5c | 5c cb 0c cd 5c 22 ce 5d |...\".S\|\...\".]|
|00001850| 5c 22 82 34 00 cb cb 0c | cf 5c 22 d0 cd 0b 53 5c |\".4....|.\"...S\|
|00001860| 22 5c 5c 0c ce 5d 5c 22 | 1d d1 20 d2 55 83 40 00 |"\\..]\"|.. .U.@.|
|00001870| d3 82 45 00 d4 d5 d1 20 | 5c 22 1e 06 69 1e 07 0b |..E.... |\"..i...|
|00001880| 0a 55 83 7d 00 d6 09 ce | 5c 22 86 5c 5c 00 d6 0a |.U.}....|\".\\...|
|00001890| 0c 54 5c 22 83 6f 00 d7 | d8 0b 0c 0d 09 0a 0e 07 |.T\".o..|........|
|000018a0| 0e 06 26 08 82 7a 00 d7 | d9 0b 0c 0d 0e 07 0e 06 |..&..z..|........|
|000018b0| 26 06 82 af 00 d6 09 ce | 5c 22 86 89 00 d6 0a 0c |&.......|\"......|
|000018c0| 54 5c 22 83 a0 00 d7 da | db 08 21 08 0b 0c 0d 09 |T\".....|..!.....|
|000018d0| 0a 0e 07 0e 06 26 0a 82 | af 00 d7 dc db 08 21 08 |.....&..|......!.|
|000018e0| 0b 0c 0d 0e 07 0e 06 26 | 08 2e 08 87 22 20 5b 63 |.......&|...." [c|
|000018f0| 68 61 72 20 62 65 67 20 | 65 6e 64 20 70 6f 73 20 |har beg |end pos |
|00001900| 74 6f 74 61 6c 20 70 65 | 72 63 65 6e 74 20 68 73 |total pe|rcent hs|
|00001910| 63 72 6f 6c 6c 20 63 6f | 6c 20 6e 69 6c 20 62 75 |croll co|l nil bu|
|00001920| 66 66 65 72 2d 73 69 7a | 65 20 35 30 30 30 30 20 |ffer-siz|e 50000 |
|00001930| 2f 20 32 30 30 20 31 30 | 30 20 31 20 32 20 2a 20 |/ 200 10|0 1 2 * |
|00001940| 77 69 6e 64 6f 77 2d 68 | 73 63 72 6f 6c 6c 20 30 |window-h|scroll 0|
|00001950| 20 22 22 20 66 6f 72 6d | 61 74 20 22 20 48 73 63 | "" form|at " Hsc|
|00001960| 72 6f 6c 6c 3d 25 64 22 | 20 2f 3d 20 6d 65 73 73 |roll=%d"| /= mess|
|00001970| 61 67 65 20 22 70 6f 69 | 6e 74 3d 25 64 20 6f 66 |age "poi|nt=%d of|
|00001980| 20 25 64 28 25 64 25 25 | 29 20 3c 25 64 20 2d 20 | %d(%d%%|) <%d - |
|00001990| 25 64 3e 20 20 63 6f 6c | 75 6d 6e 20 25 64 20 25 |%d> col|umn %d %|
|000019a0| 73 22 20 22 70 6f 69 6e | 74 3d 25 64 20 6f 66 20 |s" "poin|t=%d of |
|000019b0| 25 64 28 25 64 25 25 29 | 20 20 63 6f 6c 75 6d 6e |%d(%d%%)| column|
|000019c0| 20 25 64 20 25 73 22 20 | 22 43 68 61 72 3a 20 25 | %d %s" |"Char: %|
|000019d0| 73 20 28 30 25 6f 29 20 | 20 70 6f 69 6e 74 3d 25 |s (0%o) | point=%|
|000019e0| 64 20 6f 66 20 25 64 28 | 25 64 25 25 29 20 3c 25 |d of %d(|%d%%) <%|
|000019f0| 64 20 2d 20 25 64 3e 20 | 20 63 6f 6c 75 6d 6e 20 |d - %d> | column |
|00001a00| 25 64 20 25 73 22 20 73 | 69 6e 67 6c 65 2d 6b 65 |%d %s" s|ingle-ke|
|00001a10| 79 2d 64 65 73 63 72 69 | 70 74 69 6f 6e 20 22 43 |y-descri|ption "C|
|00001a20| 68 61 72 3a 20 25 73 20 | 28 30 25 6f 29 20 20 70 |har: %s |(0%o) p|
|00001a30| 6f 69 6e 74 3d 25 64 20 | 6f 66 20 25 64 28 25 64 |oint=%d |of %d(%d|
|00001a40| 25 25 29 20 20 63 6f 6c | 75 6d 6e 20 25 64 20 25 |%%) col|umn %d %|
|00001a50| 73 22 5d 20 32 38 29 29 | 0a 0a 28 64 65 66 75 6e |s"] 28))|..(defun|
|00001a60| 20 66 75 6e 64 61 6d 65 | 6e 74 61 6c 2d 6d 6f 64 | fundame|ntal-mod|
|00001a70| 65 20 6e 69 6c 20 22 5c | 0a 4d 61 6a 6f 72 20 6d |e nil "\|.Major m|
|00001a80| 6f 64 65 20 6e 6f 74 20 | 73 70 65 63 69 61 6c 69 |ode not |speciali|
|00001a90| 7a 65 64 20 66 6f 72 20 | 61 6e 79 74 68 69 6e 67 |zed for |anything|
|00001aa0| 20 69 6e 20 70 61 72 74 | 69 63 75 6c 61 72 2e 0a | in part|icular..|
|00001ab0| 4f 74 68 65 72 20 6d 61 | 6a 6f 72 20 6d 6f 64 65 |Other ma|jor mode|
|00001ac0| 73 20 61 72 65 20 64 65 | 66 69 6e 65 64 20 62 79 |s are de|fined by|
|00001ad0| 20 63 6f 6d 70 61 72 69 | 73 6f 6e 20 77 69 74 68 | compari|son with|
|00001ae0| 20 74 68 69 73 20 6f 6e | 65 2e 22 20 28 69 6e 74 | this on|e." (int|
|00001af0| 65 72 61 63 74 69 76 65 | 29 20 28 62 79 74 65 2d |eractive|) (byte-|
|00001b00| 63 6f 64 65 20 22 c0 88 | c1 20 87 22 20 5b 6e 69 |code "..|. ." [ni|
|00001b10| 6c 20 6b 69 6c 6c 2d 61 | 6c 6c 2d 6c 6f 63 61 6c |l kill-a|ll-local|
|00001b20| 2d 76 61 72 69 61 62 6c | 65 73 5d 20 32 29 29 0a |-variabl|es] 2)).|
|00001b30| 0a 28 70 75 74 20 28 71 | 75 6f 74 65 20 65 76 61 |.(put (q|uote eva|
|00001b40| 6c 2d 65 78 70 72 65 73 | 73 69 6f 6e 29 20 28 71 |l-expres|sion) (q|
|00001b50| 75 6f 74 65 20 64 69 73 | 61 62 6c 65 64 29 20 74 |uote dis|abled) t|
|00001b60| 29 0a 0a 28 64 65 66 75 | 6e 20 65 76 61 6c 2d 65 |)..(defu|n eval-e|
|00001b70| 78 70 72 65 73 73 69 6f | 6e 20 28 65 78 70 72 65 |xpressio|n (expre|
|00001b80| 73 73 69 6f 6e 29 20 22 | 5c 0a 45 76 61 6c 75 61 |ssion) "|\.Evalua|
|00001b90| 74 65 20 45 58 50 52 45 | 53 53 49 4f 4e 20 61 6e |te EXPRE|SSION an|
|00001ba0| 64 20 70 72 69 6e 74 20 | 76 61 6c 75 65 20 69 6e |d print |value in|
|00001bb0| 20 6d 69 6e 69 62 75 66 | 66 65 72 2e 0a 56 61 6c | minibuf|fer..Val|
|00001bc0| 75 65 20 69 73 20 61 6c | 73 6f 20 63 6f 6e 73 65 |ue is al|so conse|
|00001bd0| 64 20 6f 6e 20 74 6f 20 | 66 72 6f 6e 74 20 6f 66 |d on to |front of|
|00001be0| 20 76 61 72 69 61 62 6c | 65 20 20 76 61 6c 75 65 | variabl|e value|
|00001bf0| 73 20 20 27 73 20 76 61 | 6c 75 65 2e 22 20 28 69 |s 's va|lue." (i|
|00001c00| 6e 74 65 72 61 63 74 69 | 76 65 20 22 78 45 76 61 |nteracti|ve "xEva|
|00001c10| 6c 3a 20 22 29 20 28 62 | 79 74 65 2d 63 6f 64 65 |l: ") (b|yte-code|
|00001c20| 20 22 c3 88 c4 09 21 08 | 42 89 10 88 c5 08 40 c2 | "....!.|B.....@.|
|00001c30| 5c 22 87 22 20 5b 76 61 | 6c 75 65 73 20 65 78 70 |\"." [va|lues exp|
|00001c40| 72 65 73 73 69 6f 6e 20 | 74 20 6e 69 6c 20 65 76 |ression |t nil ev|
|00001c50| 61 6c 20 70 72 69 6e 31 | 5d 20 34 29 29 0a 0a 28 |al prin1|] 4))..(|
|00001c60| 64 65 66 75 6e 20 65 64 | 69 74 2d 61 6e 64 2d 65 |defun ed|it-and-e|
|00001c70| 76 61 6c 2d 63 6f 6d 6d | 61 6e 64 20 28 70 72 6f |val-comm|and (pro|
|00001c80| 6d 70 74 20 63 6f 6d 6d | 61 6e 64 29 20 22 5c 0a |mpt comm|and) "\.|
|00001c90| 50 72 6f 6d 70 74 69 6e | 67 20 77 69 74 68 20 50 |Promptin|g with P|
|00001ca0| 52 4f 4d 50 54 2c 20 6c | 65 74 20 75 73 65 72 20 |ROMPT, l|et user |
|00001cb0| 65 64 69 74 20 43 4f 4d | 4d 41 4e 44 20 61 6e 64 |edit COM|MAND and|
|00001cc0| 20 65 76 61 6c 20 72 65 | 73 75 6c 74 2e 0a 43 4f | eval re|sult..CO|
|00001cd0| 4d 4d 41 4e 44 20 69 73 | 20 61 20 4c 69 73 70 20 |MMAND is| a Lisp |
|00001ce0| 65 78 70 72 65 73 73 69 | 6f 6e 2e 20 20 4c 65 74 |expressi|on. Let|
|00001cf0| 20 75 73 65 72 20 65 64 | 69 74 20 74 68 61 74 20 | user ed|it that |
|00001d00| 65 78 70 72 65 73 73 69 | 6f 6e 20 69 6e 0a 74 68 |expressi|on in.th|
|00001d10| 65 20 6d 69 6e 69 62 75 | 66 66 65 72 2c 20 74 68 |e minibu|ffer, th|
|00001d20| 65 6e 20 72 65 61 64 20 | 61 6e 64 20 65 76 61 6c |en read |and eval|
|00001d30| 75 61 74 65 20 74 68 65 | 20 72 65 73 75 6c 74 2e |uate the| result.|
|00001d40| 22 20 28 62 79 74 65 2d | 63 6f 64 65 20 22 c2 c3 |" (byte-|code "..|
|00001d50| 08 c4 09 21 5c 22 21 87 | 22 20 5b 70 72 6f 6d 70 |...!\"!.|" [promp|
|00001d60| 74 20 63 6f 6d 6d 61 6e | 64 20 65 76 61 6c 20 72 |t comman|d eval r|
|00001d70| 65 61 64 2d 6d 69 6e 69 | 62 75 66 66 65 72 20 70 |ead-mini|buffer p|
|00001d80| 72 69 6e 31 2d 74 6f 2d | 73 74 72 69 6e 67 5d 20 |rin1-to-|string] |
|00001d90| 35 29 29 0a 0a 28 64 65 | 66 76 61 72 20 72 65 70 |5))..(de|fvar rep|
|00001da0| 65 61 74 2d 63 6f 6d 70 | 6c 65 78 2d 63 6f 6d 6d |eat-comp|lex-comm|
|00001db0| 61 6e 64 2d 6d 61 70 20 | 28 63 6f 70 79 2d 61 6c |and-map |(copy-al|
|00001dc0| 69 73 74 20 6d 69 6e 69 | 62 75 66 66 65 72 2d 6c |ist mini|buffer-l|
|00001dd0| 6f 63 61 6c 2d 6d 61 70 | 29 29 0a 0a 28 64 65 66 |ocal-map|))..(def|
|00001de0| 69 6e 65 2d 6b 65 79 20 | 72 65 70 65 61 74 2d 63 |ine-key |repeat-c|
|00001df0| 6f 6d 70 6c 65 78 2d 63 | 6f 6d 6d 61 6e 64 2d 6d |omplex-c|ommand-m|
|00001e00| 61 70 20 22 1b 70 22 20 | 28 71 75 6f 74 65 20 70 |ap ".p" |(quote p|
|00001e10| 72 65 76 69 6f 75 73 2d | 63 6f 6d 70 6c 65 78 2d |revious-|complex-|
|00001e20| 63 6f 6d 6d 61 6e 64 29 | 29 0a 0a 28 64 65 66 69 |command)|)..(defi|
|00001e30| 6e 65 2d 6b 65 79 20 72 | 65 70 65 61 74 2d 63 6f |ne-key r|epeat-co|
|00001e40| 6d 70 6c 65 78 2d 63 6f | 6d 6d 61 6e 64 2d 6d 61 |mplex-co|mmand-ma|
|00001e50| 70 20 22 1b 6e 22 20 28 | 71 75 6f 74 65 20 6e 65 |p ".n" (|quote ne|
|00001e60| 78 74 2d 63 6f 6d 70 6c | 65 78 2d 63 6f 6d 6d 61 |xt-compl|ex-comma|
|00001e70| 6e 64 29 29 0a 0a 28 64 | 65 66 75 6e 20 72 65 70 |nd))..(d|efun rep|
|00001e80| 65 61 74 2d 63 6f 6d 70 | 6c 65 78 2d 63 6f 6d 6d |eat-comp|lex-comm|
|00001e90| 61 6e 64 20 28 72 65 70 | 65 61 74 2d 63 6f 6d 70 |and (rep|eat-comp|
|00001ea0| 6c 65 78 2d 63 6f 6d 6d | 61 6e 64 2d 61 72 67 29 |lex-comm|and-arg)|
|00001eb0| 20 22 5c 0a 45 64 69 74 | 20 61 6e 64 20 72 65 2d | "\.Edit| and re-|
|00001ec0| 65 76 61 6c 75 61 74 65 | 20 6c 61 73 74 20 63 6f |evaluate| last co|
|00001ed0| 6d 70 6c 65 78 20 63 6f | 6d 6d 61 6e 64 2c 20 6f |mplex co|mmand, o|
|00001ee0| 72 20 41 52 47 74 68 20 | 66 72 6f 6d 20 6c 61 73 |r ARGth |from las|
|00001ef0| 74 2e 0a 41 20 63 6f 6d | 70 6c 65 78 20 63 6f 6d |t..A com|plex com|
|00001f00| 6d 61 6e 64 20 69 73 20 | 6f 6e 65 20 77 68 69 63 |mand is |one whic|
|00001f10| 68 20 75 73 65 64 20 74 | 68 65 20 6d 69 6e 69 62 |h used t|he minib|
|00001f20| 75 66 66 65 72 2e 0a 54 | 68 65 20 63 6f 6d 6d 61 |uffer..T|he comma|
|00001f30| 6e 64 20 69 73 20 70 6c | 61 63 65 64 20 69 6e 20 |nd is pl|aced in |
|00001f40| 74 68 65 20 6d 69 6e 69 | 62 75 66 66 65 72 20 61 |the mini|buffer a|
|00001f50| 73 20 61 20 4c 69 73 70 | 20 66 6f 72 6d 20 66 6f |s a Lisp| form fo|
|00001f60| 72 20 65 64 69 74 69 6e | 67 2e 0a 54 68 65 20 72 |r editin|g..The r|
|00001f70| 65 73 75 6c 74 20 69 73 | 20 65 78 65 63 75 74 65 |esult is| execute|
|00001f80| 64 2c 20 72 65 70 65 61 | 74 69 6e 67 20 74 68 65 |d, repea|ting the|
|00001f90| 20 63 6f 6d 6d 61 6e 64 | 20 61 73 20 63 68 61 6e | command| as chan|
|00001fa0| 67 65 64 2e 0a 49 66 20 | 74 68 65 20 63 6f 6d 6d |ged..If |the comm|
|00001fb0| 61 6e 64 20 68 61 73 20 | 62 65 65 6e 20 63 68 61 |and has |been cha|
|00001fc0| 6e 67 65 64 20 6f 72 20 | 69 73 20 6e 6f 74 20 74 |nged or |is not t|
|00001fd0| 68 65 20 6d 6f 73 74 20 | 72 65 63 65 6e 74 20 70 |he most |recent p|
|00001fe0| 72 65 76 69 6f 75 73 20 | 63 6f 6d 6d 61 6e 64 0a |revious |command.|
|00001ff0| 69 74 20 69 73 20 61 64 | 64 65 64 20 74 6f 20 74 |it is ad|ded to t|
|00002000| 68 65 20 66 72 6f 6e 74 | 20 6f 66 20 74 68 65 20 |he front| of the |
|00002010| 63 6f 6d 6d 61 6e 64 20 | 68 69 73 74 6f 72 79 2e |command |history.|
|00002020| 0a 57 68 69 6c 73 74 20 | 65 64 69 74 69 6e 67 20 |.Whilst |editing |
|00002030| 74 68 65 20 63 6f 6d 6d | 61 6e 64 2c 20 74 68 65 |the comm|and, the|
|00002040| 20 66 6f 6c 6c 6f 77 69 | 6e 67 20 63 6f 6d 6d 61 | followi|ng comma|
|00002050| 6e 64 73 20 61 72 65 20 | 61 76 61 69 6c 61 62 6c |nds are |availabl|
|00002060| 65 3a 0a 5c 5c 7b 72 65 | 70 65 61 74 2d 63 6f 6d |e:.\\{re|peat-com|
|00002070| 70 6c 65 78 2d 63 6f 6d | 6d 61 6e 64 2d 6d 61 70 |plex-com|mand-map|
|00002080| 7d 22 20 28 69 6e 74 65 | 72 61 63 74 69 76 65 20 |}" (inte|ractive |
|00002090| 22 70 22 29 20 28 62 79 | 74 65 2d 63 6f 64 65 20 |"p") (by|te-code |
|000020a0| 22 c6 88 09 53 0a 38 c6 | 1b 18 08 83 2c 00 c7 c8 |"...S.8.|....,...|
|000020b0| c9 08 21 0c c5 24 89 13 | 88 ca 0b 0a 40 5c 22 86 |..!..$..|....@\".|
|000020c0| 25 00 0b 0a 42 89 12 88 | cb 0b 21 82 2e 00 cc 20 |%...B...|..!.... |
|000020d0| 2a 87 22 20 5b 65 6c 74 | 20 72 65 70 65 61 74 2d |*." [elt| repeat-|
|000020e0| 63 6f 6d 70 6c 65 78 2d | 63 6f 6d 6d 61 6e 64 2d |complex-|command-|
|000020f0| 61 72 67 20 63 6f 6d 6d | 61 6e 64 2d 68 69 73 74 |arg comm|and-hist|
|00002100| 6f 72 79 20 6e 65 77 63 | 6d 64 20 72 65 70 65 61 |ory newc|md repea|
|00002110| 74 2d 63 6f 6d 70 6c 65 | 78 2d 63 6f 6d 6d 61 6e |t-comple|x-comman|
|00002120| 64 2d 6d 61 70 20 74 20 | 6e 69 6c 20 72 65 61 64 |d-map t |nil read|
|00002130| 2d 66 72 6f 6d 2d 6d 69 | 6e 69 62 75 66 66 65 72 |-from-mi|nibuffer|
|00002140| 20 22 52 65 64 6f 3a 20 | 22 20 70 72 69 6e 31 2d | "Redo: |" prin1-|
|00002150| 74 6f 2d 73 74 72 69 6e | 67 20 65 71 75 61 6c 20 |to-strin|g equal |
|00002160| 65 76 61 6c 20 64 69 6e | 67 5d 20 36 29 29 0a 0a |eval din|g] 6))..|
|00002170| 28 64 65 66 75 6e 20 6e | 65 78 74 2d 63 6f 6d 70 |(defun n|ext-comp|
|00002180| 6c 65 78 2d 63 6f 6d 6d | 61 6e 64 20 28 6e 29 20 |lex-comm|and (n) |
|00002190| 22 5c 0a 49 6e 73 65 72 | 74 73 20 74 68 65 20 6e |"\.Inser|ts the n|
|000021a0| 65 78 74 20 65 6c 65 6d | 65 6e 74 20 6f 66 20 60 |ext elem|ent of `|
|000021b0| 63 6f 6d 6d 61 6e 64 2d | 68 69 73 74 6f 72 79 27 |command-|history'|
|000021c0| 20 69 6e 74 6f 20 74 68 | 65 20 6d 69 6e 69 62 75 | into th|e minibu|
|000021d0| 66 66 65 72 2e 22 20 28 | 69 6e 74 65 72 61 63 74 |ffer." (|interact|
|000021e0| 69 76 65 20 22 70 22 29 | 20 28 62 79 74 65 2d 63 |ive "p")| (byte-c|
|000021f0| 6f 64 65 20 22 c4 88 c5 | 09 0a 5a 5d 0b 47 5e 18 |ode "...|..Z].G^.|
|00002200| 09 08 55 83 21 00 c6 09 | c5 55 83 1c 00 c7 82 1d |..U.!...|.U......|
|00002210| 00 c8 21 82 32 00 c9 20 | 88 08 89 11 88 ca 09 53 |..!.2.. |.......S|
|00002220| 0b 38 21 63 88 65 62 29 | 87 22 20 5b 6e 61 72 67 |.8!c.eb)|." [narg|
|00002230| 20 72 65 70 65 61 74 2d | 63 6f 6d 70 6c 65 78 2d | repeat-|complex-|
|00002240| 63 6f 6d 6d 61 6e 64 2d | 61 72 67 20 6e 20 63 6f |command-|arg n co|
|00002250| 6d 6d 61 6e 64 2d 68 69 | 73 74 6f 72 79 20 6e 69 |mmand-hi|story ni|
|00002260| 6c 20 31 20 65 72 72 6f | 72 20 22 4e 6f 20 66 6f |l 1 erro|r "No fo|
|00002270| 6c 6c 6f 77 69 6e 67 20 | 69 74 65 6d 20 69 6e 20 |llowing |item in |
|00002280| 63 6f 6d 6d 61 6e 64 20 | 68 69 73 74 6f 72 79 22 |command |history"|
|00002290| 20 22 4e 6f 20 70 72 65 | 63 65 65 64 69 6e 67 20 | "No pre|ceeding |
|000022a0| 69 74 65 6d 20 63 6f 6d | 6d 61 6e 64 20 68 69 73 |item com|mand his|
|000022b0| 74 6f 72 79 22 20 65 72 | 61 73 65 2d 62 75 66 66 |tory" er|ase-buff|
|000022c0| 65 72 20 70 72 69 6e 31 | 2d 74 6f 2d 73 74 72 69 |er prin1|-to-stri|
|000022d0| 6e 67 5d 20 35 29 29 0a | 0a 28 64 65 66 75 6e 20 |ng] 5)).|.(defun |
|000022e0| 70 72 65 76 69 6f 75 73 | 2d 63 6f 6d 70 6c 65 78 |previous|-complex|
|000022f0| 2d 63 6f 6d 6d 61 6e 64 | 20 28 6e 29 20 22 5c 0a |-command| (n) "\.|
|00002300| 49 6e 73 65 72 74 73 20 | 74 68 65 20 70 72 65 76 |Inserts |the prev|
|00002310| 69 6f 75 73 20 65 6c 65 | 6d 65 6e 74 20 6f 66 20 |ious ele|ment of |
|00002320| 60 63 6f 6d 6d 61 6e 64 | 2d 68 69 73 74 6f 72 79 |`command|-history|
|00002330| 27 20 69 6e 74 6f 20 74 | 68 65 20 6d 69 6e 69 62 |' into t|he minib|
|00002340| 75 66 66 65 72 2e 22 20 | 28 69 6e 74 65 72 61 63 |uffer." |(interac|
|00002350| 74 69 76 65 20 22 70 22 | 29 20 28 62 79 74 65 2d |tive "p"|) (byte-|
|00002360| 63 6f 64 65 20 22 c1 88 | c2 08 5b 21 87 22 20 5b |code "..|..[!." [|
|00002370| 6e 20 6e 69 6c 20 6e 65 | 78 74 2d 63 6f 6d 70 6c |n nil ne|xt-compl|
|00002380| 65 78 2d 63 6f 6d 6d 61 | 6e 64 5d 20 32 29 29 0a |ex-comma|nd] 2)).|
|00002390| 0a 28 64 65 66 75 6e 20 | 67 6f 74 6f 2d 6c 69 6e |.(defun |goto-lin|
|000023a0| 65 20 28 61 72 67 29 20 | 22 5c 0a 47 6f 74 6f 20 |e (arg) |"\.Goto |
|000023b0| 6c 69 6e 65 20 41 52 47 | 2c 20 63 6f 75 6e 74 69 |line ARG|, counti|
|000023c0| 6e 67 20 66 72 6f 6d 20 | 6c 69 6e 65 20 31 20 61 |ng from |line 1 a|
|000023d0| 74 20 62 65 67 69 6e 6e | 69 6e 67 20 6f 66 20 62 |t beginn|ing of b|
|000023e0| 75 66 66 65 72 2e 22 20 | 28 69 6e 74 65 72 61 63 |uffer." |(interac|
|000023f0| 74 69 76 65 20 22 4e 47 | 6f 74 6f 20 6c 69 6e 65 |tive "NG|oto line|
|00002400| 3a 20 22 29 20 28 62 79 | 74 65 2d 63 6f 64 65 20 |: ") (by|te-code |
|00002410| 22 c1 88 8c c2 20 88 c3 | 62 88 c4 08 53 21 29 87 |".... ..|b...S!).|
|00002420| 22 20 5b 61 72 67 20 6e | 69 6c 20 77 69 64 65 6e |" [arg n|il widen|
|00002430| 20 31 20 66 6f 72 77 61 | 72 64 2d 6c 69 6e 65 5d | 1 forwa|rd-line]|
|00002440| 20 33 29 29 0a 0a 28 66 | 73 65 74 20 28 71 75 6f | 3))..(f|set (quo|
|00002450| 74 65 20 61 64 76 65 72 | 74 69 73 65 64 2d 75 6e |te adver|tised-un|
|00002460| 64 6f 29 20 28 71 75 6f | 74 65 20 75 6e 64 6f 29 |do) (quo|te undo)|
|00002470| 29 0a 0a 28 64 65 66 75 | 6e 20 75 6e 64 6f 20 28 |)..(defu|n undo (|
|00002480| 26 6f 70 74 69 6f 6e 61 | 6c 20 61 72 67 29 20 22 |&optiona|l arg) "|
|00002490| 5c 0a 55 6e 64 6f 20 73 | 6f 6d 65 20 70 72 65 76 |\.Undo s|ome prev|
|000024a0| 69 6f 75 73 20 63 68 61 | 6e 67 65 73 2e 0a 52 65 |ious cha|nges..Re|
|000024b0| 70 65 61 74 20 74 68 69 | 73 20 63 6f 6d 6d 61 6e |peat thi|s comman|
|000024c0| 64 20 74 6f 20 75 6e 64 | 6f 20 6d 6f 72 65 20 63 |d to und|o more c|
|000024d0| 68 61 6e 67 65 73 2e 0a | 41 20 6e 75 6d 65 72 69 |hanges..|A numeri|
|000024e0| 63 20 61 72 67 75 6d 65 | 6e 74 20 73 65 72 76 65 |c argume|nt serve|
|000024f0| 73 20 61 73 20 61 20 72 | 65 70 65 61 74 20 63 6f |s as a r|epeat co|
|00002500| 75 6e 74 2e 22 20 28 69 | 6e 74 65 72 61 63 74 69 |unt." (i|nteracti|
|00002510| 76 65 20 22 2a 70 22 29 | 20 28 62 79 74 65 2d 63 |ve "*p")| (byte-c|
|00002520| 6f 64 65 20 22 c4 88 c5 | 20 18 c6 c7 21 88 09 c8 |ode "...| ...!...|
|00002530| 3d 86 15 00 c9 20 88 ca | cb 21 88 c8 89 12 88 ca |=.... ..|.!......|
|00002540| 0b 86 20 00 cb 21 88 08 | 85 2e 00 c5 20 3f 85 2e |.. ..!..|.... ?..|
|00002550| 00 cc 20 29 87 22 20 5b | 6d 6f 64 69 66 69 65 64 |.. )." [|modified|
|00002560| 20 6c 61 73 74 2d 63 6f | 6d 6d 61 6e 64 20 74 68 | last-co|mmand th|
|00002570| 69 73 2d 63 6f 6d 6d 61 | 6e 64 20 61 72 67 20 6e |is-comma|nd arg n|
|00002580| 69 6c 20 62 75 66 66 65 | 72 2d 6d 6f 64 69 66 69 |il buffe|r-modifi|
|00002590| 65 64 2d 70 20 6d 65 73 | 73 61 67 65 20 22 55 6e |ed-p mes|sage "Un|
|000025a0| 64 6f 21 22 20 75 6e 64 | 6f 20 75 6e 64 6f 2d 73 |do!" und|o undo-s|
|000025b0| 74 61 72 74 20 75 6e 64 | 6f 2d 6d 6f 72 65 20 31 |tart und|o-more 1|
|000025c0| 20 64 65 6c 65 74 65 2d | 61 75 74 6f 2d 73 61 76 | delete-|auto-sav|
|000025d0| 65 2d 66 69 6c 65 2d 69 | 66 2d 6e 65 63 65 73 73 |e-file-i|f-necess|
|000025e0| 61 72 79 5d 20 38 29 29 | 0a 0a 28 64 65 66 75 6e |ary] 8))|..(defun|
|000025f0| 20 73 68 65 6c 6c 2d 63 | 6f 6d 6d 61 6e 64 20 28 | shell-c|ommand (|
|00002600| 63 6f 6d 6d 61 6e 64 20 | 26 6f 70 74 69 6f 6e 61 |command |&optiona|
|00002610| 6c 20 66 6c 61 67 29 20 | 22 5c 0a 45 78 65 63 75 |l flag) |"\.Execu|
|00002620| 74 65 20 73 74 72 69 6e | 67 20 43 4f 4d 4d 41 4e |te strin|g COMMAN|
|00002630| 44 20 69 6e 20 69 6e 66 | 65 72 69 6f 72 20 73 68 |D in inf|erior sh|
|00002640| 65 6c 6c 3b 20 64 69 73 | 70 6c 61 79 20 6f 75 74 |ell; dis|play out|
|00002650| 70 75 74 2c 20 69 66 20 | 61 6e 79 2e 0a 4f 70 74 |put, if |any..Opt|
|00002660| 69 6f 6e 61 6c 20 73 65 | 63 6f 6e 64 20 61 72 67 |ional se|cond arg|
|00002670| 20 6e 6f 6e 2d 6e 69 6c | 20 28 70 72 65 66 69 78 | non-nil| (prefix|
|00002680| 20 61 72 67 2c 20 69 66 | 20 69 6e 74 65 72 61 63 | arg, if| interac|
|00002690| 74 69 76 65 29 0a 6d 65 | 61 6e 73 20 69 6e 73 65 |tive).me|ans inse|
|000026a0| 72 74 20 6f 75 74 70 75 | 74 20 69 6e 20 63 75 72 |rt outpu|t in cur|
|000026b0| 72 65 6e 74 20 62 75 66 | 66 65 72 20 61 66 74 65 |rent buf|fer afte|
|000026c0| 72 20 70 6f 69 6e 74 20 | 28 6c 65 61 76 65 20 6d |r point |(leave m|
|000026d0| 61 72 6b 20 61 66 74 65 | 72 20 69 74 29 2e 22 20 |ark afte|r it)." |
|000026e0| 28 69 6e 74 65 72 61 63 | 74 69 76 65 20 22 73 53 |(interac|tive "sS|
|000026f0| 68 65 6c 6c 20 63 6f 6d | 6d 61 6e 64 3a 20 0a 50 |hell com|mand: .P|
|00002700| 22 29 20 28 62 79 74 65 | 2d 63 6f 64 65 20 22 c2 |") (byte|-code ".|
|00002710| 88 08 83 1b 00 c5 20 88 | c6 20 88 c7 09 c2 c3 c2 |...... .|. ......|
|00002720| c8 0c 26 06 88 c9 20 82 | 21 00 ca 60 60 0c c2 24 |..&... .|!..``..$|
|00002730| 87 22 20 5b 66 6c 61 67 | 20 73 68 65 6c 6c 2d 66 |." [flag| shell-f|
|00002740| 69 6c 65 2d 6e 61 6d 65 | 20 6e 69 6c 20 74 20 63 |ile-name| nil t c|
|00002750| 6f 6d 6d 61 6e 64 20 62 | 61 72 66 2d 69 66 2d 62 |ommand b|arf-if-b|
|00002760| 75 66 66 65 72 2d 72 65 | 61 64 2d 6f 6e 6c 79 20 |uffer-re|ad-only |
|00002770| 70 75 73 68 2d 6d 61 72 | 6b 20 63 61 6c 6c 2d 70 |push-mar|k call-p|
|00002780| 72 6f 63 65 73 73 20 22 | 2d 63 22 20 65 78 63 68 |rocess "|-c" exch|
|00002790| 61 6e 67 65 2d 70 6f 69 | 6e 74 2d 61 6e 64 2d 6d |ange-poi|nt-and-m|
|000027a0| 61 72 6b 20 73 68 65 6c | 6c 2d 63 6f 6d 6d 61 6e |ark shel|l-comman|
|000027b0| 64 2d 6f 6e 2d 72 65 67 | 69 6f 6e 5d 20 39 29 29 |d-on-reg|ion] 9))|
|000027c0| 0a 0a 28 64 65 66 75 6e | 20 73 68 65 6c 6c 2d 63 |..(defun| shell-c|
|000027d0| 6f 6d 6d 61 6e 64 2d 6f | 6e 2d 72 65 67 69 6f 6e |ommand-o|n-region|
|000027e0| 20 28 73 74 61 72 74 20 | 65 6e 64 20 63 6f 6d 6d | (start |end comm|
|000027f0| 61 6e 64 20 26 6f 70 74 | 69 6f 6e 61 6c 20 66 6c |and &opt|ional fl|
|00002800| 61 67 20 69 6e 74 65 72 | 61 63 74 69 76 65 29 20 |ag inter|active) |
|00002810| 22 5c 0a 45 78 65 63 75 | 74 65 20 73 74 72 69 6e |"\.Execu|te strin|
|00002820| 67 20 43 4f 4d 4d 41 4e | 44 20 69 6e 20 69 6e 66 |g COMMAN|D in inf|
|00002830| 65 72 69 6f 72 20 73 68 | 65 6c 6c 20 77 69 74 68 |erior sh|ell with|
|00002840| 20 72 65 67 69 6f 6e 20 | 61 73 20 69 6e 70 75 74 | region |as input|
|00002850| 2e 0a 4e 6f 72 6d 61 6c | 6c 79 20 64 69 73 70 6c |..Normal|ly displ|
|00002860| 61 79 20 6f 75 74 70 75 | 74 20 28 69 66 20 61 6e |ay outpu|t (if an|
|00002870| 79 29 20 69 6e 20 74 65 | 6d 70 20 62 75 66 66 65 |y) in te|mp buffe|
|00002880| 72 3b 0a 50 72 65 66 69 | 78 20 61 72 67 20 6d 65 |r;.Prefi|x arg me|
|00002890| 61 6e 73 20 72 65 70 6c | 61 63 65 20 74 68 65 20 |ans repl|ace the |
|000028a0| 72 65 67 69 6f 6e 20 77 | 69 74 68 20 69 74 2e 0a |region w|ith it..|
|000028b0| 4e 6f 6e 69 6e 74 65 72 | 61 63 74 69 76 65 20 61 |Noninter|active a|
|000028c0| 72 67 73 20 61 72 65 20 | 53 54 41 52 54 2c 20 45 |rgs are |START, E|
|000028d0| 4e 44 2c 20 43 4f 4d 4d | 41 4e 44 2c 20 46 4c 41 |ND, COMM|AND, FLA|
|000028e0| 47 2e 0a 4e 6f 6e 69 6e | 74 65 72 61 63 74 69 76 |G..Nonin|teractiv|
|000028f0| 65 6c 79 20 46 4c 41 47 | 20 6d 65 61 6e 73 20 69 |ely FLAG| means i|
|00002900| 6e 73 65 72 74 20 6f 75 | 74 70 75 74 20 69 6e 20 |nsert ou|tput in |
|00002910| 70 6c 61 63 65 20 6f 66 | 20 74 65 78 74 20 66 72 |place of| text fr|
|00002920| 6f 6d 20 53 54 41 52 54 | 20 74 6f 20 45 4e 44 2c |om START| to END,|
|00002930| 0a 61 6e 64 20 70 75 74 | 20 70 6f 69 6e 74 20 61 |.and put| point a|
|00002940| 74 20 74 68 65 20 65 6e | 64 2c 20 62 75 74 20 64 |t the en|d, but d|
|00002950| 6f 6e 27 74 20 61 6c 74 | 65 72 20 74 68 65 20 6d |on't alt|er the m|
|00002960| 61 72 6b 2e 22 20 28 69 | 6e 74 65 72 61 63 74 69 |ark." (i|nteracti|
|00002970| 76 65 20 22 72 0a 73 53 | 68 65 6c 6c 20 63 6f 6d |ve "r.sS|hell com|
|00002980| 6d 61 6e 64 20 6f 6e 20 | 72 65 67 69 6f 6e 3a 20 |mand on |region: |
|00002990| 0a 50 0a 70 22 29 20 28 | 62 79 74 65 2d 63 6f 64 |.P.p") (|byte-cod|
|000029a0| 65 20 22 c7 88 08 83 31 | 00 0a 85 0e 00 60 ca 20 |e "....1|.....`. |
|000029b0| 57 19 0a 85 15 00 cb 20 | 88 cc 0b 0c 0d c6 c6 c7 |W...... |........|
|000029c0| cd 0e 08 26 08 88 0a 85 | 2d 00 09 85 2d 00 ce 20 |...&....|-...-.. |
|000029d0| 29 82 75 00 cf d0 21 1e | 09 8a 0e 09 71 88 d1 20 |).u...!.|....q.. |
|000029e0| 29 88 0e 09 70 3d 85 4b | 00 d2 13 d2 89 14 88 cc |)...p=.K|........|
|000029f0| 0b 0c 0d c7 0e 09 c7 cd | 0e 08 26 08 88 8a 0e 09 |........|..&.....|
|00002a00| 71 88 d3 20 d4 56 29 83 | 71 00 d5 d6 0e 09 21 d2 |q.. .V).|q.....!.|
|00002a10| 5c 22 82 74 00 d7 d8 21 | 29 87 22 20 5b 66 6c 61 |\".t...!|)." [fla|
|00002a20| 67 20 73 77 61 70 20 69 | 6e 74 65 72 61 63 74 69 |g swap i|nteracti|
|00002a30| 76 65 20 73 74 61 72 74 | 20 65 6e 64 20 73 68 65 |ve start| end she|
|00002a40| 6c 6c 2d 66 69 6c 65 2d | 6e 61 6d 65 20 74 20 6e |ll-file-|name t n|
|00002a50| 69 6c 20 63 6f 6d 6d 61 | 6e 64 20 62 75 66 66 65 |il comma|nd buffe|
|00002a60| 72 20 6d 61 72 6b 20 70 | 75 73 68 2d 6d 61 72 6b |r mark p|ush-mark|
|00002a70| 20 63 61 6c 6c 2d 70 72 | 6f 63 65 73 73 2d 72 65 | call-pr|ocess-re|
|00002a80| 67 69 6f 6e 20 22 2d 63 | 22 20 65 78 63 68 61 6e |gion "-c|" exchan|
|00002a90| 67 65 2d 70 6f 69 6e 74 | 2d 61 6e 64 2d 6d 61 72 |ge-point|-and-mar|
|00002aa0| 6b 20 67 65 74 2d 62 75 | 66 66 65 72 2d 63 72 65 |k get-bu|ffer-cre|
|00002ab0| 61 74 65 20 22 2a 53 68 | 65 6c 6c 20 43 6f 6d 6d |ate "*Sh|ell Comm|
|00002ac0| 61 6e 64 20 4f 75 74 70 | 75 74 2a 22 20 65 72 61 |and Outp|ut*" era|
|00002ad0| 73 65 2d 62 75 66 66 65 | 72 20 31 20 62 75 66 66 |se-buffe|r 1 buff|
|00002ae0| 65 72 2d 73 69 7a 65 20 | 30 20 73 65 74 2d 77 69 |er-size |0 set-wi|
|00002af0| 6e 64 6f 77 2d 73 74 61 | 72 74 20 64 69 73 70 6c |ndow-sta|rt displ|
|00002b00| 61 79 2d 62 75 66 66 65 | 72 20 6d 65 73 73 61 67 |ay-buffe|r messag|
|00002b10| 65 20 22 28 53 68 65 6c | 6c 20 63 6f 6d 6d 61 6e |e "(Shel|l comman|
|00002b20| 64 20 63 6f 6d 70 6c 65 | 74 65 64 20 77 69 74 68 |d comple|ted with|
|00002b30| 20 6e 6f 20 6f 75 74 70 | 75 74 29 22 5d 20 31 35 | no outp|ut)"] 15|
|00002b40| 29 29 0a 0a 28 64 65 66 | 75 6e 20 75 6e 69 76 65 |))..(def|un unive|
|00002b50| 72 73 61 6c 2d 61 72 67 | 75 6d 65 6e 74 20 6e 69 |rsal-arg|ument ni|
|00002b60| 6c 20 22 5c 0a 42 65 67 | 69 6e 20 61 20 6e 75 6d |l "\.Beg|in a num|
|00002b70| 65 72 69 63 20 61 72 67 | 75 6d 65 6e 74 20 66 6f |eric arg|ument fo|
|00002b80| 72 20 74 68 65 20 66 6f | 6c 6c 6f 77 69 6e 67 20 |r the fo|llowing |
|00002b90| 63 6f 6d 6d 61 6e 64 2e | 0a 44 69 67 69 74 73 20 |command.|.Digits |
|00002ba0| 6f 72 20 6d 69 6e 75 73 | 20 73 69 67 6e 20 66 6f |or minus| sign fo|
|00002bb0| 6c 6c 6f 77 69 6e 67 20 | 74 68 69 73 20 63 6f 6d |llowing |this com|
|00002bc0| 6d 61 6e 64 20 6d 61 6b | 65 20 75 70 20 74 68 65 |mand mak|e up the|
|00002bd0| 20 6e 75 6d 65 72 69 63 | 20 61 72 67 75 6d 65 6e | numeric| argumen|
|00002be0| 74 2e 0a 49 66 20 6e 6f | 20 64 69 67 69 74 73 20 |t..If no| digits |
|00002bf0| 6f 72 20 6d 69 6e 75 73 | 20 73 69 67 6e 20 66 6f |or minus| sign fo|
|00002c00| 6c 6c 6f 77 2c 20 74 68 | 69 73 20 63 6f 6d 6d 61 |llow, th|is comma|
|00002c10| 6e 64 20 62 79 20 69 74 | 73 65 6c 66 20 70 72 6f |nd by it|self pro|
|00002c20| 76 69 64 65 73 20 34 20 | 61 73 20 61 72 67 75 6d |vides 4 |as argum|
|00002c30| 65 6e 74 2e 0a 55 73 65 | 64 20 6d 6f 72 65 20 74 |ent..Use|d more t|
|00002c40| 68 61 6e 20 6f 6e 63 65 | 2c 20 74 68 69 73 20 63 |han once|, this c|
|00002c50| 6f 6d 6d 61 6e 64 20 6d | 75 6c 74 69 70 6c 69 65 |ommand m|ultiplie|
|00002c60| 73 20 74 68 65 20 61 72 | 67 75 6d 65 6e 74 20 62 |s the ar|gument b|
|00002c70| 79 20 34 20 65 61 63 68 | 20 74 69 6d 65 2e 22 20 |y 4 each| time." |
|00002c80| 28 69 6e 74 65 72 61 63 | 74 69 76 65 20 6e 69 6c |(interac|tive nil|
|00002c90| 29 20 28 62 79 74 65 2d | 63 6f 64 65 20 22 c0 88 |) (byte-|code "..|
|00002ca0| c5 0b c0 1c 1a 19 72 89 | 14 88 0c 0a 55 85 20 00 |......r.|....U. .|
|00002cb0| c6 c5 09 5c 22 89 11 88 | 72 89 14 88 82 0c 00 88 |...\"...|r.......|
|00002cc0| c7 0c 09 c0 23 2b 87 22 | 20 5b 6e 69 6c 20 63 2d |....#+."| [nil c-|
|00002cd0| 75 20 61 72 67 73 74 61 | 72 74 63 68 61 72 20 6c |u argsta|rtchar l|
|00002ce0| 61 73 74 2d 63 6f 6d 6d | 61 6e 64 2d 63 68 61 72 |ast-comm|and-char|
|00002cf0| 20 63 68 61 72 20 34 20 | 2a 20 70 72 65 66 69 78 | char 4 |* prefix|
|00002d00| 2d 61 72 67 2d 69 6e 74 | 65 72 6e 61 6c 5d 20 35 |-arg-int|ernal] 5|
|00002d10| 29 29 0a 0a 28 64 65 66 | 75 6e 20 70 72 65 66 69 |))..(def|un prefi|
|00002d20| 78 2d 61 72 67 2d 69 6e | 74 65 72 6e 61 6c 20 28 |x-arg-in|ternal (|
|00002d30| 63 68 61 72 20 63 2d 75 | 20 76 61 6c 75 65 29 20 |char c-u| value) |
|00002d40| 28 62 79 74 65 2d 63 6f | 64 65 20 22 c7 18 c8 09 |(byte-co|de "....|
|00002d50| 21 85 0b 00 09 c9 57 85 | 14 00 ca 10 09 5b 89 11 |!.....W.|.....[..|
|00002d60| 88 09 cb 3d 85 20 00 ca | 10 c2 89 11 88 cc 0b 55 |...=. ..|.......U|
|00002d70| 85 35 00 08 5b 10 c2 89 | 14 88 72 89 13 88 82 21 |.5..[...|..r....!|
|00002d80| 00 88 0b cd 59 85 3f 00 | 0b ce 58 85 60 00 cf c8 |....Y.?.|..X.`...|
|00002d90| 09 21 83 4d 00 09 82 4e | 00 c9 d0 5c 22 0b cd 5a |.!.M...N|...\"..Z|
|00002da0| 5c 5c 11 c2 89 14 88 72 | 89 13 88 82 36 00 88 0c |\\.....r|....6...|
|00002db0| 83 6a 00 0c 43 82 7e 00 | c8 09 21 83 77 00 cf 09 |.j..C.~.|..!.w...|
|00002dc0| 08 5c 22 82 7e 00 08 ca | 55 85 7e 00 cb 89 15 88 |.\".~...|U.~.....|
|00002dd0| 0b 89 16 06 29 87 22 20 | 5b 73 69 67 6e 20 76 61 |....)." |[sign va|
|00002de0| 6c 75 65 20 6e 69 6c 20 | 63 68 61 72 20 63 2d 75 |lue nil |char c-u|
|00002df0| 20 70 72 65 66 69 78 2d | 61 72 67 20 75 6e 72 65 | prefix-|arg unre|
|00002e00| 61 64 2d 63 6f 6d 6d 61 | 6e 64 2d 63 68 61 72 20 |ad-comma|nd-char |
|00002e10| 31 20 6e 75 6d 62 65 72 | 70 20 30 20 2d 31 20 2d |1 number|p 0 -1 -|
|00002e20| 20 34 35 20 34 38 20 35 | 37 20 2a 20 31 30 5d 20 | 45 48 5|7 * 10] |
|00002e30| 37 29 29 0a 0a 28 64 65 | 66 75 6e 20 64 69 67 69 |7))..(de|fun digi|
|00002e40| 74 2d 61 72 67 75 6d 65 | 6e 74 20 28 61 72 67 29 |t-argume|nt (arg)|
|00002e50| 20 22 5c 0a 50 61 72 74 | 20 6f 66 20 74 68 65 20 | "\.Part| of the |
|00002e60| 6e 75 6d 65 72 69 63 20 | 61 72 67 75 6d 65 6e 74 |numeric |argument|
|00002e70| 20 66 6f 72 20 74 68 65 | 20 6e 65 78 74 20 63 6f | for the| next co|
|00002e80| 6d 6d 61 6e 64 2e 22 20 | 28 69 6e 74 65 72 61 63 |mmand." |(interac|
|00002e90| 74 69 76 65 20 22 50 22 | 29 20 28 62 79 74 65 2d |tive "P"|) (byte-|
|00002ea0| 63 6f 64 65 20 22 c1 88 | c3 08 c1 0a 23 87 22 20 |code "..|....#." |
|00002eb0| 5b 6c 61 73 74 2d 63 6f | 6d 6d 61 6e 64 2d 63 68 |[last-co|mmand-ch|
|00002ec0| 61 72 20 6e 69 6c 20 61 | 72 67 20 70 72 65 66 69 |ar nil a|rg prefi|
|00002ed0| 78 2d 61 72 67 2d 69 6e | 74 65 72 6e 61 6c 5d 20 |x-arg-in|ternal] |
|00002ee0| 34 29 29 0a 0a 28 64 65 | 66 75 6e 20 6e 65 67 61 |4))..(de|fun nega|
|00002ef0| 74 69 76 65 2d 61 72 67 | 75 6d 65 6e 74 20 28 61 |tive-arg|ument (a|
|00002f00| 72 67 29 20 22 5c 0a 42 | 65 67 69 6e 20 61 20 6e |rg) "\.B|egin a n|
|00002f10| 65 67 61 74 69 76 65 20 | 6e 75 6d 65 72 69 63 20 |egative |numeric |
|00002f20| 61 72 67 75 6d 65 6e 74 | 20 66 6f 72 20 74 68 65 |argument| for the|
|00002f30| 20 6e 65 78 74 20 63 6f | 6d 6d 61 6e 64 2e 22 20 | next co|mmand." |
|00002f40| 28 69 6e 74 65 72 61 63 | 74 69 76 65 20 22 50 22 |(interac|tive "P"|
|00002f50| 29 20 28 62 79 74 65 2d | 63 6f 64 65 20 22 c0 88 |) (byte-|code "..|
|00002f60| c2 c3 c0 09 23 87 22 20 | 5b 6e 69 6c 20 61 72 67 |....#." |[nil arg|
|00002f70| 20 70 72 65 66 69 78 2d | 61 72 67 2d 69 6e 74 65 | prefix-|arg-inte|
|00002f80| 72 6e 61 6c 20 34 35 5d | 20 34 29 29 0a 0a 28 64 |rnal 45]| 4))..(d|
|00002f90| 65 66 75 6e 20 66 6f 72 | 77 61 72 64 2d 74 6f 2d |efun for|ward-to-|
|00002fa0| 69 6e 64 65 6e 74 61 74 | 69 6f 6e 20 28 61 72 67 |indentat|ion (arg|
|00002fb0| 29 20 22 5c 0a 4d 6f 76 | 65 20 66 6f 72 77 61 72 |) "\.Mov|e forwar|
|00002fc0| 64 20 41 52 47 20 6c 69 | 6e 65 73 20 61 6e 64 20 |d ARG li|nes and |
|00002fd0| 70 6f 73 69 74 69 6f 6e | 20 61 74 20 66 69 72 73 |position| at firs|
|00002fe0| 74 20 6e 6f 6e 62 6c 61 | 6e 6b 20 63 68 61 72 61 |t nonbla|nk chara|
|00002ff0| 63 74 65 72 2e 22 20 28 | 69 6e 74 65 72 61 63 74 |cter." (|interact|
|00003000| 69 76 65 20 22 70 22 29 | 20 28 62 79 74 65 2d 63 |ive "p")| (byte-c|
|00003010| 6f 64 65 20 22 c1 88 c2 | 08 21 88 c3 c4 21 87 22 |ode "...|.!...!."|
|00003020| 20 5b 61 72 67 20 6e 69 | 6c 20 66 6f 72 77 61 72 | [arg ni|l forwar|
|00003030| 64 2d 6c 69 6e 65 20 73 | 6b 69 70 2d 63 68 61 72 |d-line s|kip-char|
|00003040| 73 2d 66 6f 72 77 61 72 | 64 20 22 20 09 22 5d 20 |s-forwar|d " ."] |
|00003050| 33 29 29 0a 0a 28 64 65 | 66 75 6e 20 62 61 63 6b |3))..(de|fun back|
|00003060| 77 61 72 64 2d 74 6f 2d | 69 6e 64 65 6e 74 61 74 |ward-to-|indentat|
|00003070| 69 6f 6e 20 28 61 72 67 | 29 20 22 5c 0a 4d 6f 76 |ion (arg|) "\.Mov|
|00003080| 65 20 62 61 63 6b 77 61 | 72 64 20 41 52 47 20 6c |e backwa|rd ARG l|
|00003090| 69 6e 65 73 20 61 6e 64 | 20 70 6f 73 69 74 69 6f |ines and| positio|
|000030a0| 6e 20 61 74 20 66 69 72 | 73 74 20 6e 6f 6e 62 6c |n at fir|st nonbl|
|000030b0| 61 6e 6b 20 63 68 61 72 | 61 63 74 65 72 2e 22 20 |ank char|acter." |
|000030c0| 28 69 6e 74 65 72 61 63 | 74 69 76 65 20 22 70 22 |(interac|tive "p"|
|000030d0| 29 20 28 62 79 74 65 2d | 63 6f 64 65 20 22 c1 88 |) (byte-|code "..|
|000030e0| c2 08 5b 21 88 c3 c4 21 | 87 22 20 5b 61 72 67 20 |..[!...!|." [arg |
|000030f0| 6e 69 6c 20 66 6f 72 77 | 61 72 64 2d 6c 69 6e 65 |nil forw|ard-line|
|00003100| 20 73 6b 69 70 2d 63 68 | 61 72 73 2d 66 6f 72 77 | skip-ch|ars-forw|
|00003110| 61 72 64 20 22 20 09 22 | 5d 20 33 29 29 0a 0a 28 |ard " ."|] 3))..(|
|00003120| 64 65 66 75 6e 20 6b 69 | 6c 6c 2d 6c 69 6e 65 20 |defun ki|ll-line |
|00003130| 28 26 6f 70 74 69 6f 6e | 61 6c 20 61 72 67 29 20 |(&option|al arg) |
|00003140| 22 5c 0a 4b 69 6c 6c 20 | 74 68 65 20 72 65 73 74 |"\.Kill |the rest|
|00003150| 20 6f 66 20 74 68 65 20 | 63 75 72 72 65 6e 74 20 | of the |current |
|00003160| 6c 69 6e 65 3b 20 69 66 | 20 6e 6f 20 6e 6f 6e 62 |line; if| no nonb|
|00003170| 6c 61 6e 6b 73 20 74 68 | 65 72 65 2c 20 6b 69 6c |lanks th|ere, kil|
|00003180| 6c 20 74 68 72 75 20 6e | 65 77 6c 69 6e 65 2e 0a |l thru n|ewline..|
|00003190| 57 69 74 68 20 70 72 65 | 66 69 78 20 61 72 67 75 |With pre|fix argu|
|000031a0| 6d 65 6e 74 2c 20 6b 69 | 6c 6c 20 74 68 61 74 20 |ment, ki|ll that |
|000031b0| 6d 61 6e 79 20 6c 69 6e | 65 73 20 66 72 6f 6d 20 |many lin|es from |
|000031c0| 70 6f 69 6e 74 2e 0a 4e | 65 67 61 74 69 76 65 20 |point..N|egative |
|000031d0| 61 72 67 75 6d 65 6e 74 | 73 20 6b 69 6c 6c 20 6c |argument|s kill l|
|000031e0| 69 6e 65 73 20 62 61 63 | 6b 77 61 72 64 2e 0a 0a |ines bac|kward...|
|000031f0| 57 68 65 6e 20 63 61 6c | 6c 69 6e 67 20 66 72 6f |When cal|ling fro|
|00003200| 6d 20 61 20 70 72 6f 67 | 72 61 6d 2c 20 6e 69 6c |m a prog|ram, nil|
|00003210| 20 6d 65 61 6e 73 20 5c | 22 6e 6f 20 61 72 67 5c | means \|"no arg\|
|00003220| 22 2c 0a 61 20 6e 75 6d | 62 65 72 20 63 6f 75 6e |",.a num|ber coun|
|00003230| 74 73 20 61 73 20 61 20 | 70 72 65 66 69 78 20 61 |ts as a |prefix a|
|00003240| 72 67 2e 22 20 28 69 6e | 74 65 72 61 63 74 69 76 |rg." (in|teractiv|
|00003250| 65 20 22 2a 50 22 29 20 | 28 62 79 74 65 2d 63 6f |e "*P") |(byte-co|
|00003260| 64 65 20 22 c1 88 c2 60 | 08 83 10 00 c3 c4 08 21 |de "...`|.......!|
|00003270| 21 82 27 00 6d 85 18 00 | c5 c6 c1 5c 22 88 c7 c8 |!.'.m...|...\"...|
|00003280| 21 83 25 00 c3 c9 21 82 | 27 00 ca 20 88 60 5c 22 |!.%...!.|'.. .`\"|
|00003290| 87 22 20 5b 61 72 67 20 | 6e 69 6c 20 6b 69 6c 6c |." [arg |nil kill|
|000032a0| 2d 72 65 67 69 6f 6e 20 | 66 6f 72 77 61 72 64 2d |-region |forward-|
|000032b0| 6c 69 6e 65 20 70 72 65 | 66 69 78 2d 6e 75 6d 65 |line pre|fix-nume|
|000032c0| 72 69 63 2d 76 61 6c 75 | 65 20 73 69 67 6e 61 6c |ric-valu|e signal|
|000032d0| 20 65 6e 64 2d 6f 66 2d | 62 75 66 66 65 72 20 6c | end-of-|buffer l|
|000032e0| 6f 6f 6b 69 6e 67 2d 61 | 74 20 22 5b 20 09 5d 2a |ooking-a|t "[ .]*|
|000032f0| 24 22 20 31 20 65 6e 64 | 2d 6f 66 2d 6c 69 6e 65 |$" 1 end|-of-line|
|00003300| 5d 20 39 29 29 0a 0a 28 | 64 65 66 76 61 72 20 6b |] 9))..(|defvar k|
|00003310| 69 6c 6c 2d 72 69 6e 67 | 20 6e 69 6c 20 22 5c 0a |ill-ring| nil "\.|
|00003320| 4c 69 73 74 20 6f 66 20 | 6b 69 6c 6c 65 64 20 74 |List of |killed t|
|00003330| 65 78 74 20 73 65 71 75 | 65 6e 63 65 73 2e 22 29 |ext sequ|ences.")|
|00003340| 0a 0a 28 64 65 66 63 6f | 6e 73 74 20 6b 69 6c 6c |..(defco|nst kill|
|00003350| 2d 72 69 6e 67 2d 6d 61 | 78 20 33 30 20 22 5c 0a |-ring-ma|x 30 "\.|
|00003360| 2a 4d 61 78 69 6d 75 6d | 20 6c 65 6e 67 74 68 20 |*Maximum| length |
|00003370| 6f 66 20 6b 69 6c 6c 20 | 72 69 6e 67 20 62 65 66 |of kill |ring bef|
|00003380| 6f 72 65 20 6f 6c 64 65 | 73 74 20 65 6c 65 6d 65 |ore olde|st eleme|
|00003390| 6e 74 73 20 61 72 65 20 | 74 68 72 6f 77 6e 20 61 |nts are |thrown a|
|000033a0| 77 61 79 2e 22 29 0a 0a | 28 64 65 66 76 61 72 20 |way.")..|(defvar |
|000033b0| 6b 69 6c 6c 2d 72 69 6e | 67 2d 79 61 6e 6b 2d 70 |kill-rin|g-yank-p|
|000033c0| 6f 69 6e 74 65 72 20 6e | 69 6c 20 22 5c 0a 54 68 |ointer n|il "\.Th|
|000033d0| 65 20 74 61 69 6c 20 6f | 66 20 74 68 65 20 6b 69 |e tail o|f the ki|
|000033e0| 6c 6c 20 72 69 6e 67 20 | 77 68 6f 73 65 20 63 61 |ll ring |whose ca|
|000033f0| 72 20 69 73 20 74 68 65 | 20 6c 61 73 74 20 74 68 |r is the| last th|
|00003400| 69 6e 67 20 79 61 6e 6b | 65 64 2e 22 29 0a 0a 28 |ing yank|ed.")..(|
|00003410| 64 65 66 75 6e 20 6b 69 | 6c 6c 2d 61 70 70 65 6e |defun ki|ll-appen|
|00003420| 64 20 28 73 74 72 69 6e | 67 20 62 65 66 6f 72 65 |d (strin|g before|
|00003430| 2d 70 29 20 28 62 79 74 | 65 2d 63 6f 64 65 20 22 |-p) (byt|e-code "|
|00003440| c3 08 09 83 0d 00 0a 08 | 40 50 82 11 00 08 40 0a |........|@P....@.|
|00003450| 50 5c 22 87 22 20 5b 6b | 69 6c 6c 2d 72 69 6e 67 |P\"." [k|ill-ring|
|00003460| 20 62 65 66 6f 72 65 2d | 70 20 73 74 72 69 6e 67 | before-|p string|
|00003470| 20 73 65 74 63 61 72 5d | 20 34 29 29 0a 0a 28 64 | setcar]| 4))..(d|
|00003480| 65 66 75 6e 20 6b 69 6c | 6c 2d 72 65 67 69 6f 6e |efun kil|l-region|
|00003490| 20 28 62 65 67 20 65 6e | 64 29 20 22 5c 0a 4b 69 | (beg en|d) "\.Ki|
|000034a0| 6c 6c 20 62 65 74 77 65 | 65 6e 20 70 6f 69 6e 74 |ll betwe|en point|
|000034b0| 20 61 6e 64 20 6d 61 72 | 6b 2e 0a 54 68 65 20 74 | and mar|k..The t|
|000034c0| 65 78 74 20 69 73 20 64 | 65 6c 65 74 65 64 20 62 |ext is d|eleted b|
|000034d0| 75 74 20 73 61 76 65 64 | 20 69 6e 20 74 68 65 20 |ut saved| in the |
|000034e0| 6b 69 6c 6c 20 72 69 6e | 67 2e 0a 54 68 65 20 63 |kill rin|g..The c|
|000034f0| 6f 6d 6d 61 6e 64 20 5c | 5c 5b 79 61 6e 6b 5d 20 |ommand \|\[yank] |
|00003500| 63 61 6e 20 72 65 74 72 | 69 65 76 65 20 69 74 20 |can retr|ieve it |
|00003510| 66 72 6f 6d 20 74 68 65 | 72 65 2e 0a 28 49 66 20 |from the|re..(If |
|00003520| 79 6f 75 20 77 61 6e 74 | 20 74 6f 20 6b 69 6c 6c |you want| to kill|
|00003530| 20 61 6e 64 20 74 68 65 | 6e 20 79 61 6e 6b 20 69 | and the|n yank i|
|00003540| 6d 6d 65 64 69 61 74 65 | 6c 79 2c 20 75 73 65 20 |mmediate|ly, use |
|00003550| 5c 5c 5b 63 6f 70 79 2d | 72 65 67 69 6f 6e 2d 61 |\\[copy-|region-a|
|00003560| 73 2d 6b 69 6c 6c 5d 2e | 29 0a 0a 54 68 69 73 20 |s-kill].|)..This |
|00003570| 69 73 20 74 68 65 20 70 | 72 69 6d 69 74 69 76 65 |is the p|rimitive|
|00003580| 20 66 6f 72 20 70 72 6f | 67 72 61 6d 73 20 74 6f | for pro|grams to|
|00003590| 20 6b 69 6c 6c 20 74 65 | 78 74 20 28 61 73 20 6f | kill te|xt (as o|
|000035a0| 70 70 6f 73 65 64 20 74 | 6f 20 64 65 6c 65 74 69 |pposed t|o deleti|
|000035b0| 6e 67 20 69 74 29 2e 0a | 53 75 70 70 6c 79 20 74 |ng it)..|Supply t|
|000035c0| 77 6f 20 61 72 67 75 6d | 65 6e 74 73 2c 20 63 68 |wo argum|ents, ch|
|000035d0| 61 72 61 63 74 65 72 20 | 6e 75 6d 62 65 72 73 20 |aracter |numbers |
|000035e0| 69 6e 64 69 63 61 74 69 | 6e 67 20 74 68 65 20 73 |indicati|ng the s|
|000035f0| 74 72 65 74 63 68 20 6f | 66 20 74 65 78 74 0a 20 |tretch o|f text. |
|00003600| 74 6f 20 62 65 20 6b 69 | 6c 6c 65 64 2e 0a 41 6e |to be ki|lled..An|
|00003610| 79 20 63 6f 6d 6d 61 6e | 64 20 74 68 61 74 20 63 |y comman|d that c|
|00003620| 61 6c 6c 73 20 74 68 69 | 73 20 66 75 6e 63 74 69 |alls thi|s functi|
|00003630| 6f 6e 20 69 73 20 61 20 | 5c 22 6b 69 6c 6c 20 63 |on is a |\"kill c|
|00003640| 6f 6d 6d 61 6e 64 5c 22 | 2e 0a 49 66 20 74 68 65 |ommand\"|..If the|
|00003650| 20 70 72 65 76 69 6f 75 | 73 20 63 6f 6d 6d 61 6e | previou|s comman|
|00003660| 64 20 77 61 73 20 61 6c | 73 6f 20 61 20 6b 69 6c |d was al|so a kil|
|00003670| 6c 20 63 6f 6d 6d 61 6e | 64 2c 0a 74 68 65 20 74 |l comman|d,.the t|
|00003680| 65 78 74 20 6b 69 6c 6c | 65 64 20 74 68 69 73 20 |ext kill|ed this |
|00003690| 74 69 6d 65 20 61 70 70 | 65 6e 64 73 20 74 6f 20 |time app|ends to |
|000036a0| 74 68 65 20 74 65 78 74 | 20 6b 69 6c 6c 65 64 20 |the text| killed |
|000036b0| 6c 61 73 74 20 74 69 6d | 65 0a 74 6f 20 6d 61 6b |last tim|e.to mak|
|000036c0| 65 20 6f 6e 65 20 65 6e | 74 72 79 20 69 6e 20 74 |e one en|try in t|
|000036d0| 68 65 20 6b 69 6c 6c 20 | 72 69 6e 67 2e 22 20 28 |he kill |ring." (|
|000036e0| 69 6e 74 65 72 61 63 74 | 69 76 65 20 22 2a 72 22 |interact|ive "*r"|
|000036f0| 29 20 28 62 79 74 65 2d | 63 6f 64 65 20 22 c8 88 |) (byte-|code "..|
|00003700| 08 c1 3d 3f 85 0d 00 0a | cb 3d 3f 83 4b 00 0c 0d |..=?....|.=?.K...|
|00003710| 5d 0c 0d 5e 5a cc 5c 5c | 1b cd 0c 0d 5c 22 88 08 |]..^Z.\\|....\"..|
|00003720| 40 40 0e 06 42 89 16 06 | 88 0e 06 47 0e 07 56 85 |@@..B...|...G..V.|
|00003730| 3c 00 ce cf 0e 07 53 0e | 06 5c 22 c8 5c 22 88 cb |<.....S.|.\".\"..|
|00003740| 89 16 09 88 0e 06 89 16 | 0a 29 82 54 00 d0 0c 0d |........|.).T....|
|00003750| 5c 22 88 cd 0c 0d 5c 22 | 87 22 20 5b 62 75 66 66 |\"....\"|." [buff|
|00003760| 65 72 2d 75 6e 64 6f 2d | 6c 69 73 74 20 74 20 6c |er-undo-|list t l|
|00003770| 61 73 74 2d 63 6f 6d 6d | 61 6e 64 20 75 6e 64 6f |ast-comm|and undo|
|00003780| 2d 68 69 67 68 2d 74 68 | 72 65 73 68 6f 6c 64 20 |-high-th|reshold |
|00003790| 62 65 67 20 65 6e 64 20 | 6b 69 6c 6c 2d 72 69 6e |beg end |kill-rin|
|000037a0| 67 20 6b 69 6c 6c 2d 72 | 69 6e 67 2d 6d 61 78 20 |g kill-r|ing-max |
|000037b0| 6e 69 6c 20 74 68 69 73 | 2d 63 6f 6d 6d 61 6e 64 |nil this|-command|
|000037c0| 20 6b 69 6c 6c 2d 72 69 | 6e 67 2d 79 61 6e 6b 2d | kill-ri|ng-yank-|
|000037d0| 70 6f 69 6e 74 65 72 20 | 6b 69 6c 6c 2d 72 65 67 |pointer |kill-reg|
|000037e0| 69 6f 6e 20 31 30 30 20 | 64 65 6c 65 74 65 2d 72 |ion 100 |delete-r|
|000037f0| 65 67 69 6f 6e 20 73 65 | 74 63 64 72 20 6e 74 68 |egion se|tcdr nth|
|00003800| 63 64 72 20 63 6f 70 79 | 2d 72 65 67 69 6f 6e 2d |cdr copy|-region-|
|00003810| 61 73 2d 6b 69 6c 6c 5d | 20 37 29 29 0a 0a 28 66 |as-kill]| 7))..(f|
|00003820| 73 65 74 20 28 71 75 6f | 74 65 20 6b 69 6c 6c 2d |set (quo|te kill-|
|00003830| 72 69 6e 67 2d 73 61 76 | 65 29 20 28 71 75 6f 74 |ring-sav|e) (quot|
|00003840| 65 20 63 6f 70 79 2d 72 | 65 67 69 6f 6e 2d 61 73 |e copy-r|egion-as|
|00003850| 2d 6b 69 6c 6c 29 29 0a | 0a 28 64 65 66 75 6e 20 |-kill)).|.(defun |
|00003860| 63 6f 70 79 2d 72 65 67 | 69 6f 6e 2d 61 73 2d 6b |copy-reg|ion-as-k|
|00003870| 69 6c 6c 20 28 62 65 67 | 20 65 6e 64 29 20 22 5c |ill (beg| end) "\|
|00003880| 0a 53 61 76 65 20 74 68 | 65 20 72 65 67 69 6f 6e |.Save th|e region|
|00003890| 20 61 73 20 69 66 20 6b | 69 6c 6c 65 64 2c 20 62 | as if k|illed, b|
|000038a0| 75 74 20 64 6f 6e 27 74 | 20 6b 69 6c 6c 20 69 74 |ut don't| kill it|
|000038b0| 2e 22 20 28 69 6e 74 65 | 72 61 63 74 69 76 65 20 |." (inte|ractive |
|000038c0| 22 72 22 29 20 28 62 79 | 74 65 2d 63 6f 64 65 20 |"r") (by|te-code |
|000038d0| 22 c5 88 08 c8 3d 83 14 | 00 c9 ca 09 0a 5c 22 0a |"....=..|.....\".|
|000038e0| 09 57 5c 22 82 2c 00 ca | 09 0a 5c 22 0b 42 89 13 |.W\".,..|..\".B..|
|000038f0| 88 0b 47 0c 56 85 2c 00 | cb cc 0c 53 0b 5c 22 c5 |..G.V.,.|...S.\".|
|00003900| 5c 22 88 c8 89 16 06 88 | 0b 89 16 07 87 22 20 5b |\"......|....." [|
|00003910| 6c 61 73 74 2d 63 6f 6d | 6d 61 6e 64 20 62 65 67 |last-com|mand beg|
|00003920| 20 65 6e 64 20 6b 69 6c | 6c 2d 72 69 6e 67 20 6b | end kil|l-ring k|
|00003930| 69 6c 6c 2d 72 69 6e 67 | 2d 6d 61 78 20 6e 69 6c |ill-ring|-max nil|
|00003940| 20 74 68 69 73 2d 63 6f | 6d 6d 61 6e 64 20 6b 69 | this-co|mmand ki|
|00003950| 6c 6c 2d 72 69 6e 67 2d | 79 61 6e 6b 2d 70 6f 69 |ll-ring-|yank-poi|
|00003960| 6e 74 65 72 20 6b 69 6c | 6c 2d 72 65 67 69 6f 6e |nter kil|l-region|
|00003970| 20 6b 69 6c 6c 2d 61 70 | 70 65 6e 64 20 62 75 66 | kill-ap|pend buf|
|00003980| 66 65 72 2d 73 75 62 73 | 74 72 69 6e 67 20 73 65 |fer-subs|tring se|
|00003990| 74 63 64 72 20 6e 74 68 | 63 64 72 5d 20 37 29 29 |tcdr nth|cdr] 7))|
|000039a0| 0a 0a 28 64 65 66 75 6e | 20 61 70 70 65 6e 64 2d |..(defun| append-|
|000039b0| 6e 65 78 74 2d 6b 69 6c | 6c 20 6e 69 6c 20 22 5c |next-kil|l nil "\|
|000039c0| 0a 43 61 75 73 65 20 66 | 6f 6c 6c 6f 77 69 6e 67 |.Cause f|ollowing|
|000039d0| 20 63 6f 6d 6d 61 6e 64 | 2c 20 69 66 20 6b 69 6c | command|, if kil|
|000039e0| 6c 2c 20 74 6f 20 61 70 | 70 65 6e 64 20 74 6f 20 |l, to ap|pend to |
|000039f0| 70 72 65 76 69 6f 75 73 | 20 6b 69 6c 6c 2e 22 20 |previous| kill." |
|00003a00| 28 69 6e 74 65 72 61 63 | 74 69 76 65 29 20 28 62 |(interac|tive) (b|
|00003a10| 79 74 65 2d 63 6f 64 65 | 20 22 c2 88 74 83 0c 00 |yte-code| "..t...|
|00003a20| c3 89 10 82 0f 00 c3 89 | 11 87 22 20 5b 74 68 69 |........|.." [thi|
|00003a30| 73 2d 63 6f 6d 6d 61 6e | 64 20 6c 61 73 74 2d 63 |s-comman|d last-c|
|00003a40| 6f 6d 6d 61 6e 64 20 6e | 69 6c 20 6b 69 6c 6c 2d |ommand n|il kill-|
|00003a50| 72 65 67 69 6f 6e 5d 20 | 32 29 29 0a 0a 28 64 65 |region] |2))..(de|
|00003a60| 66 75 6e 20 72 6f 74 61 | 74 65 2d 79 61 6e 6b 2d |fun rota|te-yank-|
|00003a70| 70 6f 69 6e 74 65 72 20 | 28 61 72 67 29 20 22 5c |pointer |(arg) "\|
|00003a80| 0a 52 6f 74 61 74 65 20 | 74 68 65 20 79 61 6e 6b |.Rotate |the yank|
|00003a90| 69 6e 67 20 70 6f 69 6e | 74 20 69 6e 20 74 68 65 |ing poin|t in the|
|00003aa0| 20 6b 69 6c 6c 20 72 69 | 6e 67 2e 22 20 28 69 6e | kill ri|ng." (in|
|00003ab0| 74 65 72 61 63 74 69 76 | 65 20 22 70 22 29 20 28 |teractiv|e "p") (|
|00003ac0| 62 79 74 65 2d 63 6f 64 | 65 20 22 c4 88 09 47 18 |byte-cod|e "...G.|
|00003ad0| c5 08 21 83 11 00 c6 c7 | 21 82 1f 00 c8 c9 0b 08 |..!.....|!.......|
|00003ae0| 0a 47 5a 5c 5c 08 5c 22 | 09 5c 22 89 12 29 87 22 |.GZ\\.\"|.\"..)."|
|00003af0| 20 5b 6c 65 6e 67 74 68 | 20 6b 69 6c 6c 2d 72 69 | [length| kill-ri|
|00003b00| 6e 67 20 6b 69 6c 6c 2d | 72 69 6e 67 2d 79 61 6e |ng kill-|ring-yan|
|00003b10| 6b 2d 70 6f 69 6e 74 65 | 72 20 61 72 67 20 6e 69 |k-pointe|r arg ni|
|00003b20| 6c 20 7a 65 72 6f 70 20 | 65 72 72 6f 72 20 22 4b |l zerop |error "K|
|00003b30| 69 6c 6c 20 72 69 6e 67 | 20 69 73 20 65 6d 70 74 |ill ring| is empt|
|00003b40| 79 22 20 6e 74 68 63 64 | 72 20 25 5d 20 37 29 29 |y" nthcd|r %] 7))|
|00003b50| 0a 0a 28 64 65 66 75 6e | 20 79 61 6e 6b 2d 70 6f |..(defun| yank-po|
|00003b60| 70 20 28 61 72 67 29 20 | 22 5c 0a 52 65 70 6c 61 |p (arg) |"\.Repla|
|00003b70| 63 65 20 6a 75 73 74 2d | 79 61 6e 6b 65 64 20 73 |ce just-|yanked s|
|00003b80| 74 72 65 74 63 68 20 6f | 66 20 6b 69 6c 6c 65 64 |tretch o|f killed|
|00003b90| 2d 74 65 78 74 20 77 69 | 74 68 20 61 20 64 69 66 |-text wi|th a dif|
|00003ba0| 66 65 72 65 6e 74 20 73 | 74 72 65 74 63 68 2e 0a |ferent s|tretch..|
|00003bb0| 54 68 69 73 20 63 6f 6d | 6d 61 6e 64 20 69 73 20 |This com|mand is |
|00003bc0| 61 6c 6c 6f 77 65 64 20 | 6f 6e 6c 79 20 69 6d 6d |allowed |only imm|
|00003bd0| 65 64 69 61 74 65 6c 79 | 20 61 66 74 65 72 20 61 |ediately| after a|
|00003be0| 20 20 79 61 6e 6b 20 20 | 6f 72 20 61 20 20 79 61 | yank |or a ya|
|00003bf0| 6e 6b 2d 70 6f 70 2e 0a | 41 74 20 73 75 63 68 20 |nk-pop..|At such |
|00003c00| 61 20 74 69 6d 65 2c 20 | 74 68 65 20 72 65 67 69 |a time, |the regi|
|00003c10| 6f 6e 20 63 6f 6e 74 61 | 69 6e 73 20 61 20 73 74 |on conta|ins a st|
|00003c20| 72 65 74 63 68 20 6f 66 | 20 72 65 69 6e 73 65 72 |retch of| reinser|
|00003c30| 74 65 64 0a 70 72 65 76 | 69 6f 75 73 6c 79 2d 6b |ted.prev|iously-k|
|00003c40| 69 6c 6c 65 64 20 74 65 | 78 74 2e 20 20 79 61 6e |illed te|xt. yan|
|00003c50| 6b 2d 70 6f 70 20 20 64 | 65 6c 65 74 65 73 20 74 |k-pop d|eletes t|
|00003c60| 68 61 74 20 74 65 78 74 | 20 61 6e 64 20 69 6e 73 |hat text| and ins|
|00003c70| 65 72 74 73 20 69 6e 20 | 69 74 73 0a 70 6c 61 63 |erts in |its.plac|
|00003c80| 65 20 61 20 64 69 66 66 | 65 72 65 6e 74 20 73 74 |e a diff|erent st|
|00003c90| 72 65 74 63 68 20 6f 66 | 20 6b 69 6c 6c 65 64 20 |retch of| killed |
|00003ca0| 74 65 78 74 2e 0a 0a 57 | 69 74 68 20 6e 6f 20 61 |text...W|ith no a|
|00003cb0| 72 67 75 6d 65 6e 74 2c | 20 74 68 65 20 70 72 65 |rgument,| the pre|
|00003cc0| 76 69 6f 75 73 20 6b 69 | 6c 6c 20 69 73 20 69 6e |vious ki|ll is in|
|00003cd0| 73 65 72 74 65 64 2e 0a | 57 69 74 68 20 61 72 67 |serted..|With arg|
|00003ce0| 75 6d 65 6e 74 20 6e 2c | 20 74 68 65 20 6e 27 74 |ument n,| the n't|
|00003cf0| 68 20 70 72 65 76 69 6f | 75 73 20 6b 69 6c 6c 20 |h previo|us kill |
|00003d00| 69 73 20 69 6e 73 65 72 | 74 65 64 2e 0a 49 66 20 |is inser|ted..If |
|00003d10| 6e 20 69 73 20 6e 65 67 | 61 74 69 76 65 2c 20 74 |n is neg|ative, t|
|00003d20| 68 69 73 20 69 73 20 61 | 20 6d 6f 72 65 20 72 65 |his is a| more re|
|00003d30| 63 65 6e 74 20 6b 69 6c | 6c 2e 0a 0a 54 68 65 20 |cent kil|l...The |
|00003d40| 73 65 71 75 65 6e 63 65 | 20 6f 66 20 6b 69 6c 6c |sequence| of kill|
|00003d50| 73 20 77 72 61 70 73 20 | 61 72 6f 75 6e 64 2c 20 |s wraps |around, |
|00003d60| 73 6f 20 74 68 61 74 20 | 61 66 74 65 72 20 74 68 |so that |after th|
|00003d70| 65 20 6f 6c 64 65 73 74 | 20 6f 6e 65 0a 63 6f 6d |e oldest| one.com|
|00003d80| 65 73 20 74 68 65 20 6e | 65 77 65 73 74 20 6f 6e |es the n|ewest on|
|00003d90| 65 2e 22 20 28 69 6e 74 | 65 72 61 63 74 69 76 65 |e." (int|eractive|
|00003da0| 20 22 2a 70 22 29 20 28 | 62 79 74 65 2d 63 6f 64 | "*p") (|byte-cod|
|00003db0| 65 20 22 c5 88 08 c6 3d | 3f 85 0c 00 c7 c8 21 88 |e "....=|?.....!.|
|00003dc0| c6 89 11 88 60 c9 20 57 | 1a ca 60 c9 20 5c 22 88 |....`. W|..`. \".|
|00003dd0| cb 0b 21 88 cc 60 21 88 | 0c 40 63 88 0a 85 2e 00 |..!..`!.|.@c.....|
|00003de0| cd 20 29 87 22 20 5b 6c | 61 73 74 2d 63 6f 6d 6d |. )." [l|ast-comm|
|00003df0| 61 6e 64 20 74 68 69 73 | 2d 63 6f 6d 6d 61 6e 64 |and this|-command|
|00003e00| 20 62 65 66 6f 72 65 20 | 61 72 67 20 6b 69 6c 6c | before |arg kill|
|00003e10| 2d 72 69 6e 67 2d 79 61 | 6e 6b 2d 70 6f 69 6e 74 |-ring-ya|nk-point|
|00003e20| 65 72 20 6e 69 6c 20 79 | 61 6e 6b 20 65 72 72 6f |er nil y|ank erro|
|00003e30| 72 20 22 50 72 65 76 69 | 6f 75 73 20 63 6f 6d 6d |r "Previ|ous comm|
|00003e40| 61 6e 64 20 77 61 73 20 | 6e 6f 74 20 61 20 79 61 |and was |not a ya|
|00003e50| 6e 6b 22 20 6d 61 72 6b | 20 64 65 6c 65 74 65 2d |nk" mark| delete-|
|00003e60| 72 65 67 69 6f 6e 20 72 | 6f 74 61 74 65 2d 79 61 |region r|otate-ya|
|00003e70| 6e 6b 2d 70 6f 69 6e 74 | 65 72 20 73 65 74 2d 6d |nk-point|er set-m|
|00003e80| 61 72 6b 20 65 78 63 68 | 61 6e 67 65 2d 70 6f 69 |ark exch|ange-poi|
|00003e90| 6e 74 2d 61 6e 64 2d 6d | 61 72 6b 5d 20 38 29 29 |nt-and-m|ark] 8))|
|00003ea0| 0a 0a 28 64 65 66 75 6e | 20 79 61 6e 6b 20 28 26 |..(defun| yank (&|
|00003eb0| 6f 70 74 69 6f 6e 61 6c | 20 61 72 67 29 20 22 5c |optional| arg) "\|
|00003ec0| 0a 52 65 69 6e 73 65 72 | 74 20 74 68 65 20 6c 61 |.Reinser|t the la|
|00003ed0| 73 74 20 73 74 72 65 74 | 63 68 20 6f 66 20 6b 69 |st stret|ch of ki|
|00003ee0| 6c 6c 65 64 20 74 65 78 | 74 2e 0a 4d 6f 72 65 20 |lled tex|t..More |
|00003ef0| 70 72 65 63 69 73 65 6c | 79 2c 20 72 65 69 6e 73 |precisel|y, reins|
|00003f00| 65 72 74 20 74 68 65 20 | 73 74 72 65 74 63 68 20 |ert the |stretch |
|00003f10| 6f 66 20 6b 69 6c 6c 65 | 64 20 74 65 78 74 20 6d |of kille|d text m|
|00003f20| 6f 73 74 20 72 65 63 65 | 6e 74 6c 79 0a 6b 69 6c |ost rece|ntly.kil|
|00003f30| 6c 65 64 20 4f 52 20 79 | 61 6e 6b 65 64 2e 0a 57 |led OR y|anked..W|
|00003f40| 69 74 68 20 6a 75 73 74 | 20 43 2d 55 20 61 73 20 |ith just| C-U as |
|00003f50| 61 72 67 75 6d 65 6e 74 | 2c 20 73 61 6d 65 20 62 |argument|, same b|
|00003f60| 75 74 20 70 75 74 20 70 | 6f 69 6e 74 20 69 6e 20 |ut put p|oint in |
|00003f70| 66 72 6f 6e 74 20 28 61 | 6e 64 20 6d 61 72 6b 20 |front (a|nd mark |
|00003f80| 61 74 20 65 6e 64 29 2e | 0a 57 69 74 68 20 61 72 |at end).|.With ar|
|00003f90| 67 75 6d 65 6e 74 20 6e | 2c 20 72 65 69 6e 73 65 |gument n|, reinse|
|00003fa0| 72 74 20 74 68 65 20 6e | 74 68 20 6d 6f 73 74 20 |rt the n|th most |
|00003fb0| 72 65 63 65 6e 74 6c 79 | 20 6b 69 6c 6c 65 64 20 |recently| killed |
|00003fc0| 73 74 72 65 74 63 68 20 | 6f 66 20 6b 69 6c 6c 65 |stretch |of kille|
|00003fd0| 64 0a 74 65 78 74 2e 0a | 53 65 65 20 61 6c 73 6f |d.text..|See also|
|00003fe0| 20 74 68 65 20 63 6f 6d | 6d 61 6e 64 20 5c 5c 5b | the com|mand \\[|
|00003ff0| 79 61 6e 6b 2d 70 6f 70 | 5d 2e 22 20 28 69 6e 74 |yank-pop|]." (int|
|00004000| 65 72 61 63 74 69 76 65 | 20 22 2a 50 22 29 20 28 |eractive| "*P") (|
|00004010| 62 79 74 65 2d 63 6f 64 | 65 20 22 c2 88 c3 08 3c |byte-cod|e "....<|
|00004020| 83 0c 00 c4 82 18 00 08 | c5 3d 83 16 00 c6 82 18 |........|.=......|
|00004030| 00 08 53 21 88 c7 60 21 | 88 09 40 63 88 08 3a 85 |..S!..`!|..@c..:.|
|00004040| 29 00 c8 20 87 22 20 5b | 61 72 67 20 6b 69 6c 6c |).. ." [|arg kill|
|00004050| 2d 72 69 6e 67 2d 79 61 | 6e 6b 2d 70 6f 69 6e 74 |-ring-ya|nk-point|
|00004060| 65 72 20 6e 69 6c 20 72 | 6f 74 61 74 65 2d 79 61 |er nil r|otate-ya|
|00004070| 6e 6b 2d 70 6f 69 6e 74 | 65 72 20 30 20 2d 20 2d |nk-point|er 0 - -|
|00004080| 31 20 70 75 73 68 2d 6d | 61 72 6b 20 65 78 63 68 |1 push-m|ark exch|
|00004090| 61 6e 67 65 2d 70 6f 69 | 6e 74 2d 61 6e 64 2d 6d |ange-poi|nt-and-m|
|000040a0| 61 72 6b 5d 20 34 29 29 | 0a 0a 28 64 65 66 75 6e |ark] 4))|..(defun|
|000040b0| 20 69 6e 73 65 72 74 2d | 62 75 66 66 65 72 20 28 | insert-|buffer (|
|000040c0| 62 75 66 66 65 72 29 20 | 22 5c 0a 49 6e 73 65 72 |buffer) |"\.Inser|
|000040d0| 74 20 61 66 74 65 72 20 | 70 6f 69 6e 74 20 74 68 |t after |point th|
|000040e0| 65 20 63 6f 6e 74 65 6e | 74 73 20 6f 66 20 42 55 |e conten|ts of BU|
|000040f0| 46 46 45 52 2e 0a 50 75 | 74 73 20 6d 61 72 6b 20 |FFER..Pu|ts mark |
|00004100| 61 66 74 65 72 20 74 68 | 65 20 69 6e 73 65 72 74 |after th|e insert|
|00004110| 65 64 20 74 65 78 74 2e | 0a 42 55 46 46 45 52 20 |ed text.|.BUFFER |
|00004120| 6d 61 79 20 62 65 20 61 | 20 62 75 66 66 65 72 20 |may be a| buffer |
|00004130| 6f 72 20 61 20 62 75 66 | 66 65 72 20 6e 61 6d 65 |or a buf|fer name|
|00004140| 2e 22 20 28 69 6e 74 65 | 72 61 63 74 69 76 65 20 |." (inte|ractive |
|00004150| 22 2a 62 49 6e 73 65 72 | 74 20 62 75 66 66 65 72 |"*bInser|t buffer|
|00004160| 3a 20 22 29 20 28 62 79 | 74 65 2d 63 6f 64 65 20 |: ") (by|te-code |
|00004170| 22 c4 88 c5 08 21 86 0d | 00 c6 08 21 89 10 88 c4 |"....!..|...!....|
|00004180| c4 c4 1b 1a 19 8a 8a 08 | 71 88 65 11 64 89 12 29 |........|q.e.d..)|
|00004190| 88 c7 08 09 0a 23 88 60 | 89 13 29 88 c8 0b 21 2b |.....#.`|..)...!+|
|000041a0| 87 22 20 5b 62 75 66 66 | 65 72 20 73 74 61 72 74 |." [buff|er start|
|000041b0| 20 65 6e 64 20 6e 65 77 | 6d 61 72 6b 20 6e 69 6c | end new|mark nil|
|000041c0| 20 62 75 66 66 65 72 70 | 20 67 65 74 2d 62 75 66 | bufferp| get-buf|
|000041d0| 66 65 72 20 69 6e 73 65 | 72 74 2d 62 75 66 66 65 |fer inse|rt-buffe|
|000041e0| 72 2d 73 75 62 73 74 72 | 69 6e 67 20 70 75 73 68 |r-substr|ing push|
|000041f0| 2d 6d 61 72 6b 5d 20 36 | 29 29 0a 0a 28 64 65 66 |-mark] 6|))..(def|
|00004200| 75 6e 20 61 70 70 65 6e | 64 2d 74 6f 2d 62 75 66 |un appen|d-to-buf|
|00004210| 66 65 72 20 28 62 75 66 | 66 65 72 20 73 74 61 72 |fer (buf|fer star|
|00004220| 74 20 65 6e 64 29 20 22 | 5c 0a 41 70 70 65 6e 64 |t end) "|\.Append|
|00004230| 20 74 6f 20 73 70 65 63 | 69 66 69 65 64 20 62 75 | to spec|ified bu|
|00004240| 66 66 65 72 20 74 68 65 | 20 74 65 78 74 20 6f 66 |ffer the| text of|
|00004250| 20 74 68 65 20 72 65 67 | 69 6f 6e 2e 0a 49 74 20 | the reg|ion..It |
|00004260| 69 73 20 69 6e 73 65 72 | 74 65 64 20 69 6e 74 6f |is inser|ted into|
|00004270| 20 74 68 61 74 20 62 75 | 66 66 65 72 20 62 65 66 | that bu|ffer bef|
|00004280| 6f 72 65 20 69 74 73 20 | 70 6f 69 6e 74 2e 0a 0a |ore its |point...|
|00004290| 57 68 65 6e 20 63 61 6c | 6c 69 6e 67 20 66 72 6f |When cal|ling fro|
|000042a0| 6d 20 61 20 70 72 6f 67 | 72 61 6d 2c 20 67 69 76 |m a prog|ram, giv|
|000042b0| 65 20 74 68 72 65 65 20 | 61 72 67 75 6d 65 6e 74 |e three |argument|
|000042c0| 73 3a 0a 61 20 62 75 66 | 66 65 72 20 6f 72 20 74 |s:.a buf|fer or t|
|000042d0| 68 65 20 6e 61 6d 65 20 | 6f 66 20 6f 6e 65 2c 20 |he name |of one, |
|000042e0| 61 6e 64 20 74 77 6f 20 | 63 68 61 72 61 63 74 65 |and two |characte|
|000042f0| 72 20 6e 75 6d 62 65 72 | 73 0a 73 70 65 63 69 66 |r number|s.specif|
|00004300| 79 69 6e 67 20 74 68 65 | 20 70 6f 72 74 69 6f 6e |ying the| portion|
|00004310| 20 6f 66 20 74 68 65 20 | 63 75 72 72 65 6e 74 20 | of the |current |
|00004320| 62 75 66 66 65 72 20 74 | 6f 20 62 65 20 63 6f 70 |buffer t|o be cop|
|00004330| 69 65 64 2e 22 20 28 69 | 6e 74 65 72 61 63 74 69 |ied." (i|nteracti|
|00004340| 76 65 20 22 42 41 70 70 | 65 6e 64 20 74 6f 20 62 |ve "BApp|end to b|
|00004350| 75 66 66 65 72 3a 20 0a | 72 22 29 20 28 62 79 74 |uffer: .|r") (byt|
|00004360| 65 2d 63 6f 64 65 20 22 | c4 88 70 18 8a c5 09 21 |e-code "|..p....!|
|00004370| 71 88 c6 08 0a 0b 23 29 | 29 87 22 20 5b 6f 6c 64 |q.....#)|)." [old|
|00004380| 62 75 66 20 62 75 66 66 | 65 72 20 73 74 61 72 74 |buf buff|er start|
|00004390| 20 65 6e 64 20 6e 69 6c | 20 67 65 74 2d 62 75 66 | end nil| get-buf|
|000043a0| 66 65 72 2d 63 72 65 61 | 74 65 20 69 6e 73 65 72 |fer-crea|te inser|
|000043b0| 74 2d 62 75 66 66 65 72 | 2d 73 75 62 73 74 72 69 |t-buffer|-substri|
|000043c0| 6e 67 5d 20 35 29 29 0a | 0a 28 64 65 66 75 6e 20 |ng] 5)).|.(defun |
|000043d0| 70 72 65 70 65 6e 64 2d | 74 6f 2d 62 75 66 66 65 |prepend-|to-buffe|
|000043e0| 72 20 28 62 75 66 66 65 | 72 20 73 74 61 72 74 20 |r (buffe|r start |
|000043f0| 65 6e 64 29 20 22 5c 0a | 50 72 65 70 65 6e 64 20 |end) "\.|Prepend |
|00004400| 74 6f 20 73 70 65 63 69 | 66 69 65 64 20 62 75 66 |to speci|fied buf|
|00004410| 66 65 72 20 74 68 65 20 | 74 65 78 74 20 6f 66 20 |fer the |text of |
|00004420| 74 68 65 20 72 65 67 69 | 6f 6e 2e 0a 49 74 20 69 |the regi|on..It i|
|00004430| 73 20 69 6e 73 65 72 74 | 65 64 20 69 6e 74 6f 20 |s insert|ed into |
|00004440| 74 68 61 74 20 62 75 66 | 66 65 72 20 61 66 74 65 |that buf|fer afte|
|00004450| 72 20 69 74 73 20 70 6f | 69 6e 74 2e 0a 0a 57 68 |r its po|int...Wh|
|00004460| 65 6e 20 63 61 6c 6c 69 | 6e 67 20 66 72 6f 6d 20 |en calli|ng from |
|00004470| 61 20 70 72 6f 67 72 61 | 6d 2c 20 67 69 76 65 20 |a progra|m, give |
|00004480| 74 68 72 65 65 20 61 72 | 67 75 6d 65 6e 74 73 3a |three ar|guments:|
|00004490| 0a 61 20 62 75 66 66 65 | 72 20 6f 72 20 74 68 65 |.a buffe|r or the|
|000044a0| 20 6e 61 6d 65 20 6f 66 | 20 6f 6e 65 2c 20 61 6e | name of| one, an|
|000044b0| 64 20 74 77 6f 20 63 68 | 61 72 61 63 74 65 72 20 |d two ch|aracter |
|000044c0| 6e 75 6d 62 65 72 73 0a | 73 70 65 63 69 66 79 69 |numbers.|specifyi|
|000044d0| 6e 67 20 74 68 65 20 70 | 6f 72 74 69 6f 6e 20 6f |ng the p|ortion o|
|000044e0| 66 20 74 68 65 20 63 75 | 72 72 65 6e 74 20 62 75 |f the cu|rrent bu|
|000044f0| 66 66 65 72 20 74 6f 20 | 62 65 20 63 6f 70 69 65 |ffer to |be copie|
|00004500| 64 2e 22 20 28 69 6e 74 | 65 72 61 63 74 69 76 65 |d." (int|eractive|
|00004510| 20 22 42 50 72 65 70 65 | 6e 64 20 74 6f 20 62 75 | "BPrepe|nd to bu|
|00004520| 66 66 65 72 3a 20 0a 72 | 22 29 20 28 62 79 74 65 |ffer: .r|") (byte|
|00004530| 2d 63 6f 64 65 20 22 c4 | 88 70 18 8a c5 09 21 71 |-code ".|.p....!q|
|00004540| 88 8a c6 08 0a 0b 23 29 | 29 29 87 22 20 5b 6f 6c |......#)|))." [ol|
|00004550| 64 62 75 66 20 62 75 66 | 66 65 72 20 73 74 61 72 |dbuf buf|fer star|
|00004560| 74 20 65 6e 64 20 6e 69 | 6c 20 67 65 74 2d 62 75 |t end ni|l get-bu|
|00004570| 66 66 65 72 2d 63 72 65 | 61 74 65 20 69 6e 73 65 |ffer-cre|ate inse|
|00004580| 72 74 2d 62 75 66 66 65 | 72 2d 73 75 62 73 74 72 |rt-buffe|r-substr|
|00004590| 69 6e 67 5d 20 35 29 29 | 0a 0a 28 64 65 66 75 6e |ing] 5))|..(defun|
|000045a0| 20 63 6f 70 79 2d 74 6f | 2d 62 75 66 66 65 72 20 | copy-to|-buffer |
|000045b0| 28 62 75 66 66 65 72 20 | 73 74 61 72 74 20 65 6e |(buffer |start en|
|000045c0| 64 29 20 22 5c 0a 43 6f | 70 79 20 74 6f 20 73 70 |d) "\.Co|py to sp|
|000045d0| 65 63 69 66 69 65 64 20 | 62 75 66 66 65 72 20 74 |ecified |buffer t|
|000045e0| 68 65 20 74 65 78 74 20 | 6f 66 20 74 68 65 20 72 |he text |of the r|
|000045f0| 65 67 69 6f 6e 2e 0a 49 | 74 20 69 73 20 69 6e 73 |egion..I|t is ins|
|00004600| 65 72 74 65 64 20 69 6e | 74 6f 20 74 68 61 74 20 |erted in|to that |
|00004610| 62 75 66 66 65 72 2c 20 | 72 65 70 6c 61 63 69 6e |buffer, |replacin|
|00004620| 67 20 65 78 69 73 74 69 | 6e 67 20 74 65 78 74 20 |g existi|ng text |
|00004630| 74 68 65 72 65 2e 0a 0a | 57 68 65 6e 20 63 61 6c |there...|When cal|
|00004640| 6c 69 6e 67 20 66 72 6f | 6d 20 61 20 70 72 6f 67 |ling fro|m a prog|
|00004650| 72 61 6d 2c 20 67 69 76 | 65 20 74 68 72 65 65 20 |ram, giv|e three |
|00004660| 61 72 67 75 6d 65 6e 74 | 73 3a 0a 61 20 62 75 66 |argument|s:.a buf|
|00004670| 66 65 72 20 6f 72 20 74 | 68 65 20 6e 61 6d 65 20 |fer or t|he name |
|00004680| 6f 66 20 6f 6e 65 2c 20 | 61 6e 64 20 74 77 6f 20 |of one, |and two |
|00004690| 63 68 61 72 61 63 74 65 | 72 20 6e 75 6d 62 65 72 |characte|r number|
|000046a0| 73 0a 73 70 65 63 69 66 | 79 69 6e 67 20 74 68 65 |s.specif|ying the|
|000046b0| 20 70 6f 72 74 69 6f 6e | 20 6f 66 20 74 68 65 20 | portion| of the |
|000046c0| 63 75 72 72 65 6e 74 20 | 62 75 66 66 65 72 20 74 |current |buffer t|
|000046d0| 6f 20 62 65 20 63 6f 70 | 69 65 64 2e 22 20 28 69 |o be cop|ied." (i|
|000046e0| 6e 74 65 72 61 63 74 69 | 76 65 20 22 42 43 6f 70 |nteracti|ve "BCop|
|000046f0| 79 20 74 6f 20 62 75 66 | 66 65 72 3a 20 0a 72 22 |y to buf|fer: .r"|
|00004700| 29 20 28 62 79 74 65 2d | 63 6f 64 65 20 22 c4 88 |) (byte-|code "..|
|00004710| 70 18 8a c5 09 21 71 88 | c6 20 88 8a c7 08 0a 0b |p....!q.|. ......|
|00004720| 23 29 29 29 87 22 20 5b | 6f 6c 64 62 75 66 20 62 |#)))." [|oldbuf b|
|00004730| 75 66 66 65 72 20 73 74 | 61 72 74 20 65 6e 64 20 |uffer st|art end |
|00004740| 6e 69 6c 20 67 65 74 2d | 62 75 66 66 65 72 2d 63 |nil get-|buffer-c|
|00004750| 72 65 61 74 65 20 65 72 | 61 73 65 2d 62 75 66 66 |reate er|ase-buff|
|00004760| 65 72 20 69 6e 73 65 72 | 74 2d 62 75 66 66 65 72 |er inser|t-buffer|
|00004770| 2d 73 75 62 73 74 72 69 | 6e 67 5d 20 36 29 29 0a |-substri|ng] 6)).|
|00004780| 0a 28 64 65 66 75 6e 20 | 6d 61 72 6b 20 6e 69 6c |.(defun |mark nil|
|00004790| 20 22 5c 0a 52 65 74 75 | 72 6e 20 74 68 69 73 20 | "\.Retu|rn this |
|000047a0| 62 75 66 66 65 72 27 73 | 20 6d 61 72 6b 20 76 61 |buffer's| mark va|
|000047b0| 6c 75 65 20 61 73 20 69 | 6e 74 65 67 65 72 2c 20 |lue as i|nteger, |
|000047c0| 6f 72 20 6e 69 6c 20 69 | 66 20 6e 6f 20 6d 61 72 |or nil i|f no mar|
|000047d0| 6b 2e 0a 49 66 20 79 6f | 75 20 61 72 65 20 75 73 |k..If yo|u are us|
|000047e0| 69 6e 67 20 74 68 69 73 | 20 69 6e 20 61 6e 20 65 |ing this| in an e|
|000047f0| 64 69 74 69 6e 67 20 63 | 6f 6d 6d 61 6e 64 2c 20 |diting c|ommand, |
|00004800| 79 6f 75 20 61 72 65 20 | 6d 6f 73 74 20 6c 69 6b |you are |most lik|
|00004810| 65 6c 79 20 6d 61 6b 69 | 6e 67 0a 61 20 6d 69 73 |ely maki|ng.a mis|
|00004820| 74 61 6b 65 3b 20 73 65 | 65 20 74 68 65 20 64 6f |take; se|e the do|
|00004830| 63 75 6d 65 6e 74 61 74 | 69 6f 6e 20 6f 66 20 60 |cumentat|ion of `|
|00004840| 73 65 74 2d 6d 61 72 6b | 27 2e 22 20 28 62 79 74 |set-mark|'." (byt|
|00004850| 65 2d 63 6f 64 65 20 22 | c0 c1 20 21 87 22 20 5b |e-code "|.. !." [|
|00004860| 6d 61 72 6b 65 72 2d 70 | 6f 73 69 74 69 6f 6e 20 |marker-p|osition |
|00004870| 6d 61 72 6b 2d 6d 61 72 | 6b 65 72 5d 20 33 29 29 |mark-mar|ker] 3))|
|00004880| 0a 0a 28 64 65 66 75 6e | 20 73 65 74 2d 6d 61 72 |..(defun| set-mar|
|00004890| 6b 20 28 70 6f 73 29 20 | 22 5c 0a 53 65 74 20 74 |k (pos) |"\.Set t|
|000048a0| 68 69 73 20 62 75 66 66 | 65 72 27 73 20 6d 61 72 |his buff|er's mar|
|000048b0| 6b 20 74 6f 20 50 4f 53 | 2e 20 20 44 6f 6e 27 74 |k to POS|. Don't|
|000048c0| 20 75 73 65 20 74 68 69 | 73 20 66 75 6e 63 74 69 | use thi|s functi|
|000048d0| 6f 6e 21 0a 54 68 61 74 | 20 69 73 20 74 6f 20 73 |on!.That| is to s|
|000048e0| 61 79 2c 20 64 6f 6e 27 | 74 20 75 73 65 20 74 68 |ay, don'|t use th|
|000048f0| 69 73 20 66 75 6e 63 74 | 69 6f 6e 20 75 6e 6c 65 |is funct|ion unle|
|00004900| 73 73 20 79 6f 75 20 77 | 61 6e 74 0a 74 68 65 20 |ss you w|ant.the |
|00004910| 75 73 65 72 20 74 6f 20 | 73 65 65 20 74 68 61 74 |user to |see that|
|00004920| 20 74 68 65 20 6d 61 72 | 6b 20 68 61 73 20 6d 6f | the mar|k has mo|
|00004930| 76 65 64 2c 20 61 6e 64 | 20 79 6f 75 20 77 61 6e |ved, and| you wan|
|00004940| 74 20 74 68 65 20 70 72 | 65 76 69 6f 75 73 0a 6d |t the pr|evious.m|
|00004950| 61 72 6b 20 70 6f 73 69 | 74 69 6f 6e 20 74 6f 20 |ark posi|tion to |
|00004960| 62 65 20 6c 6f 73 74 2e | 0a 0a 4e 6f 72 6d 61 6c |be lost.|..Normal|
|00004970| 6c 79 2c 20 77 68 65 6e | 20 61 20 6e 65 77 20 6d |ly, when| a new m|
|00004980| 61 72 6b 20 69 73 20 73 | 65 74 2c 20 74 68 65 20 |ark is s|et, the |
|00004990| 6f 6c 64 20 6f 6e 65 20 | 73 68 6f 75 6c 64 20 67 |old one |should g|
|000049a0| 6f 20 6f 6e 20 74 68 65 | 20 73 74 61 63 6b 2e 0a |o on the| stack..|
|000049b0| 54 68 69 73 20 69 73 20 | 77 68 79 20 6d 6f 73 74 |This is |why most|
|000049c0| 20 61 70 70 6c 69 63 61 | 74 69 6f 6e 73 20 73 68 | applica|tions sh|
|000049d0| 6f 75 6c 64 20 75 73 65 | 20 70 75 73 68 2d 6d 61 |ould use| push-ma|
|000049e0| 72 6b 2c 20 6e 6f 74 20 | 73 65 74 2d 6d 61 72 6b |rk, not |set-mark|
|000049f0| 2e 0a 0a 4e 6f 76 69 63 | 65 20 65 6d 61 63 73 2d |...Novic|e emacs-|
|00004a00| 6c 69 73 70 20 70 72 6f | 67 72 61 6d 6d 65 72 73 |lisp pro|grammers|
|00004a10| 20 6f 66 74 65 6e 20 74 | 72 79 20 74 6f 20 75 73 | often t|ry to us|
|00004a20| 65 20 74 68 65 20 6d 61 | 72 6b 20 66 6f 72 20 74 |e the ma|rk for t|
|00004a30| 68 65 20 77 72 6f 6e 67 | 0a 70 75 72 70 6f 73 65 |he wrong|.purpose|
|00004a40| 73 2e 20 20 54 68 65 20 | 6d 61 72 6b 20 73 61 76 |s. The |mark sav|
|00004a50| 65 73 20 61 20 6c 6f 63 | 61 74 69 6f 6e 20 66 6f |es a loc|ation fo|
|00004a60| 72 20 74 68 65 20 75 73 | 65 72 27 73 20 63 6f 6e |r the us|er's con|
|00004a70| 76 65 6e 69 65 6e 63 65 | 2e 0a 4d 6f 73 74 20 65 |venience|..Most e|
|00004a80| 64 69 74 69 6e 67 20 63 | 6f 6d 6d 61 6e 64 73 20 |diting c|ommands |
|00004a90| 73 68 6f 75 6c 64 20 6e | 6f 74 20 61 6c 74 65 72 |should n|ot alter|
|00004aa0| 20 74 68 65 20 6d 61 72 | 6b 2e 0a 54 6f 20 72 65 | the mar|k..To re|
|00004ab0| 6d 65 6d 62 65 72 20 61 | 20 6c 6f 63 61 74 69 6f |member a| locatio|
|00004ac0| 6e 20 66 6f 72 20 69 6e | 74 65 72 6e 61 6c 20 75 |n for in|ternal u|
|00004ad0| 73 65 20 69 6e 20 74 68 | 65 20 4c 69 73 70 20 70 |se in th|e Lisp p|
|00004ae0| 72 6f 67 72 61 6d 2c 0a | 73 74 6f 72 65 20 69 74 |rogram,.|store it|
|00004af0| 20 69 6e 20 61 20 4c 69 | 73 70 20 76 61 72 69 61 | in a Li|sp varia|
|00004b00| 62 6c 65 2e 20 20 45 78 | 61 6d 70 6c 65 3a 0a 0a |ble. Ex|ample:..|
|00004b10| 20 20 20 28 6c 65 74 20 | 28 28 62 65 67 20 28 70 | (let |((beg (p|
|00004b20| 6f 69 6e 74 29 29 29 20 | 28 66 6f 72 77 61 72 64 |oint))) |(forward|
|00004b30| 2d 6c 69 6e 65 20 31 29 | 20 28 64 65 6c 65 74 65 |-line 1)| (delete|
|00004b40| 2d 72 65 67 69 6f 6e 20 | 62 65 67 20 28 70 6f 69 |-region |beg (poi|
|00004b50| 6e 74 29 29 29 2e 22 20 | 28 62 79 74 65 2d 63 6f |nt)))." |(byte-co|
|00004b60| 64 65 20 22 c1 c2 20 08 | 70 23 87 22 20 5b 70 6f |de ".. .|p#." [po|
|00004b70| 73 20 73 65 74 2d 6d 61 | 72 6b 65 72 20 6d 61 72 |s set-ma|rker mar|
|00004b80| 6b 2d 6d 61 72 6b 65 72 | 5d 20 35 29 29 0a 0a 28 |k-marker|] 5))..(|
|00004b90| 64 65 66 76 61 72 20 6d | 61 72 6b 2d 72 69 6e 67 |defvar m|ark-ring|
|00004ba0| 20 6e 69 6c 20 22 5c 0a | 54 68 65 20 6c 69 73 74 | nil "\.|The list|
|00004bb0| 20 6f 66 20 73 61 76 65 | 64 20 66 6f 72 6d 65 72 | of save|d former|
|00004bc0| 20 6d 61 72 6b 73 20 6f | 66 20 74 68 65 20 63 75 | marks o|f the cu|
|00004bd0| 72 72 65 6e 74 20 62 75 | 66 66 65 72 2c 0a 6d 6f |rrent bu|ffer,.mo|
|00004be0| 73 74 20 72 65 63 65 6e | 74 20 66 69 72 73 74 2e |st recen|t first.|
|00004bf0| 22 29 0a 0a 28 6d 61 6b | 65 2d 76 61 72 69 61 62 |")..(mak|e-variab|
|00004c00| 6c 65 2d 62 75 66 66 65 | 72 2d 6c 6f 63 61 6c 20 |le-buffe|r-local |
|00004c10| 28 71 75 6f 74 65 20 6d | 61 72 6b 2d 72 69 6e 67 |(quote m|ark-ring|
|00004c20| 29 29 0a 0a 28 64 65 66 | 63 6f 6e 73 74 20 6d 61 |))..(def|const ma|
|00004c30| 72 6b 2d 72 69 6e 67 2d | 6d 61 78 20 31 36 20 22 |rk-ring-|max 16 "|
|00004c40| 5c 0a 2a 4d 61 78 69 6d | 75 6d 20 73 69 7a 65 20 |\.*Maxim|um size |
|00004c50| 6f 66 20 6d 61 72 6b 20 | 72 69 6e 67 2e 20 20 53 |of mark |ring. S|
|00004c60| 74 61 72 74 20 64 69 73 | 63 61 72 64 69 6e 67 20 |tart dis|carding |
|00004c70| 6f 66 66 20 65 6e 64 20 | 69 66 20 67 65 74 73 20 |off end |if gets |
|00004c80| 74 68 69 73 20 62 69 67 | 2e 22 29 0a 0a 28 64 65 |this big|.")..(de|
|00004c90| 66 75 6e 20 73 65 74 2d | 6d 61 72 6b 2d 63 6f 6d |fun set-|mark-com|
|00004ca0| 6d 61 6e 64 20 28 61 72 | 67 29 20 22 5c 0a 53 65 |mand (ar|g) "\.Se|
|00004cb0| 74 20 6d 61 72 6b 20 61 | 74 20 77 68 65 72 65 20 |t mark a|t where |
|00004cc0| 70 6f 69 6e 74 20 69 73 | 2c 20 6f 72 20 6a 75 6d |point is|, or jum|
|00004cd0| 70 20 74 6f 20 6d 61 72 | 6b 2e 0a 57 69 74 68 20 |p to mar|k..With |
|00004ce0| 6e 6f 20 70 72 65 66 69 | 78 20 61 72 67 75 6d 65 |no prefi|x argume|
|00004cf0| 6e 74 2c 20 73 65 74 20 | 6d 61 72 6b 2c 20 61 6e |nt, set |mark, an|
|00004d00| 64 20 70 75 73 68 20 70 | 72 65 76 69 6f 75 73 20 |d push p|revious |
|00004d10| 6d 61 72 6b 20 6f 6e 20 | 6d 61 72 6b 20 72 69 6e |mark on |mark rin|
|00004d20| 67 2e 0a 57 69 74 68 20 | 61 72 67 75 6d 65 6e 74 |g..With |argument|
|00004d30| 2c 20 6a 75 6d 70 20 74 | 6f 20 6d 61 72 6b 2c 20 |, jump t|o mark, |
|00004d40| 61 6e 64 20 70 6f 70 20 | 69 6e 74 6f 20 6d 61 72 |and pop |into mar|
|00004d50| 6b 20 6f 66 66 20 74 68 | 65 20 6d 61 72 6b 20 72 |k off th|e mark r|
|00004d60| 69 6e 67 2e 0a 0a 4e 6f | 76 69 63 65 20 65 6d 61 |ing...No|vice ema|
|00004d70| 63 73 2d 6c 69 73 70 20 | 70 72 6f 67 72 61 6d 6d |cs-lisp |programm|
|00004d80| 65 72 73 20 6f 66 74 65 | 6e 20 74 72 79 20 74 6f |ers ofte|n try to|
|00004d90| 20 75 73 65 20 74 68 65 | 20 6d 61 72 6b 20 66 6f | use the| mark fo|
|00004da0| 72 20 74 68 65 20 77 72 | 6f 6e 67 0a 70 75 72 70 |r the wr|ong.purp|
|00004db0| 6f 73 65 73 2e 20 20 53 | 65 65 20 74 68 65 20 64 |oses. S|ee the d|
|00004dc0| 6f 63 75 6d 65 6e 74 61 | 74 69 6f 6e 20 6f 66 20 |ocumenta|tion of |
|00004dd0| 60 73 65 74 2d 6d 61 72 | 6b 27 20 66 6f 72 20 6d |`set-mar|k' for m|
|00004de0| 6f 72 65 20 69 6e 66 6f | 72 6d 61 74 69 6f 6e 2e |ore info|rmation.|
|00004df0| 22 20 28 69 6e 74 65 72 | 61 63 74 69 76 65 20 22 |" (inter|active "|
|00004e00| 50 22 29 20 28 62 79 74 | 65 2d 63 6f 64 65 20 22 |P") (byt|e-code "|
|00004e10| c1 88 08 3f 83 0c 00 c2 | 20 82 1e 00 c3 20 3f 83 |...?....| .... ?.|
|00004e20| 18 00 c4 c5 21 82 1e 00 | c3 20 62 88 c6 20 87 22 |....!...|. b.. ."|
|00004e30| 20 5b 61 72 67 20 6e 69 | 6c 20 70 75 73 68 2d 6d | [arg ni|l push-m|
|00004e40| 61 72 6b 20 6d 61 72 6b | 20 65 72 72 6f 72 20 22 |ark mark| error "|
|00004e50| 4e 6f 20 6d 61 72 6b 20 | 73 65 74 20 69 6e 20 74 |No mark |set in t|
|00004e60| 68 69 73 20 62 75 66 66 | 65 72 22 20 70 6f 70 2d |his buff|er" pop-|
|00004e70| 6d 61 72 6b 5d 20 36 29 | 29 0a 0a 28 64 65 66 75 |mark] 6)|)..(defu|
|00004e80| 6e 20 70 75 73 68 2d 6d | 61 72 6b 20 28 26 6f 70 |n push-m|ark (&op|
|00004e90| 74 69 6f 6e 61 6c 20 6c | 6f 63 61 74 69 6f 6e 20 |tional l|ocation |
|00004ea0| 6e 6f 6d 73 67 29 20 22 | 5c 0a 53 65 74 20 6d 61 |nomsg) "|\.Set ma|
|00004eb0| 72 6b 20 61 74 20 4c 4f | 43 41 54 49 4f 4e 20 28 |rk at LO|CATION (|
|00004ec0| 70 6f 69 6e 74 2c 20 62 | 79 20 64 65 66 61 75 6c |point, b|y defaul|
|00004ed0| 74 29 20 61 6e 64 20 70 | 75 73 68 20 6f 6c 64 20 |t) and p|ush old |
|00004ee0| 6d 61 72 6b 20 6f 6e 20 | 6d 61 72 6b 20 72 69 6e |mark on |mark rin|
|00004ef0| 67 2e 0a 44 69 73 70 6c | 61 79 73 20 5c 22 4d 61 |g..Displ|ays \"Ma|
|00004f00| 72 6b 20 73 65 74 5c 22 | 20 75 6e 6c 65 73 73 20 |rk set\"| unless |
|00004f10| 74 68 65 20 6f 70 74 69 | 6f 6e 61 6c 20 73 65 63 |the opti|onal sec|
|00004f20| 6f 6e 64 20 61 72 67 20 | 4e 4f 4d 53 47 20 69 73 |ond arg |NOMSG is|
|00004f30| 20 6e 6f 6e 2d 6e 69 6c | 2e 0a 0a 4e 6f 76 69 63 | non-nil|...Novic|
|00004f40| 65 20 65 6d 61 63 73 2d | 6c 69 73 70 20 70 72 6f |e emacs-|lisp pro|
|00004f50| 67 72 61 6d 6d 65 72 73 | 20 6f 66 74 65 6e 20 74 |grammers| often t|
|00004f60| 72 79 20 74 6f 20 75 73 | 65 20 74 68 65 20 6d 61 |ry to us|e the ma|
|00004f70| 72 6b 20 66 6f 72 20 74 | 68 65 20 77 72 6f 6e 67 |rk for t|he wrong|
|00004f80| 0a 70 75 72 70 6f 73 65 | 73 2e 20 20 53 65 65 20 |.purpose|s. See |
|00004f90| 74 68 65 20 64 6f 63 75 | 6d 65 6e 74 61 74 69 6f |the docu|mentatio|
|00004fa0| 6e 20 6f 66 20 60 73 65 | 74 2d 6d 61 72 6b 27 20 |n of `se|t-mark' |
|00004fb0| 66 6f 72 20 6d 6f 72 65 | 20 69 6e 66 6f 72 6d 61 |for more| informa|
|00004fc0| 74 69 6f 6e 2e 22 20 28 | 62 79 74 65 2d 63 6f 64 |tion." (|byte-cod|
|00004fd0| 65 20 22 c6 20 3f 83 0a | 00 c0 82 2b 00 c7 c8 20 |e ". ?..|...+... |
|00004fe0| 21 09 42 89 11 88 09 47 | 0a 56 85 2b 00 c9 ca 0a |!.B....G|.V.+....|
|00004ff0| 09 5c 22 40 c0 5c 22 88 | cb ca 0a 53 09 5c 22 c0 |.\"@.\".|...S.\".|
|00005000| 5c 22 88 cc 0b 86 32 00 | 60 21 88 0c 86 46 00 0d |\"....2.|`!...F..|
|00005010| 86 46 00 cd 20 ce 56 86 | 46 00 cf d0 21 87 22 20 |.F.. .V.|F...!." |
|00005020| 5b 6e 69 6c 20 6d 61 72 | 6b 2d 72 69 6e 67 20 6d |[nil mar|k-ring m|
|00005030| 61 72 6b 2d 72 69 6e 67 | 2d 6d 61 78 20 6c 6f 63 |ark-ring|-max loc|
|00005040| 61 74 69 6f 6e 20 6e 6f | 6d 73 67 20 65 78 65 63 |ation no|msg exec|
|00005050| 75 74 69 6e 67 2d 6d 61 | 63 72 6f 20 6d 61 72 6b |uting-ma|cro mark|
|00005060| 20 63 6f 70 79 2d 6d 61 | 72 6b 65 72 20 6d 61 72 | copy-ma|rker mar|
|00005070| 6b 2d 6d 61 72 6b 65 72 | 20 6d 6f 76 65 2d 6d 61 |k-marker| move-ma|
|00005080| 72 6b 65 72 20 6e 74 68 | 63 64 72 20 73 65 74 63 |rker nth|cdr setc|
|00005090| 64 72 20 73 65 74 2d 6d | 61 72 6b 20 6d 69 6e 69 |dr set-m|ark mini|
|000050a0| 62 75 66 66 65 72 2d 64 | 65 70 74 68 20 30 20 6d |buffer-d|epth 0 m|
|000050b0| 65 73 73 61 67 65 20 22 | 4d 61 72 6b 20 73 65 74 |essage "|Mark set|
|000050c0| 22 5d 20 31 31 29 29 0a | 0a 28 64 65 66 75 6e 20 |"] 11)).|.(defun |
|000050d0| 70 6f 70 2d 6d 61 72 6b | 20 6e 69 6c 20 22 5c 0a |pop-mark| nil "\.|
|000050e0| 50 6f 70 20 6f 66 66 20 | 6d 61 72 6b 20 72 69 6e |Pop off |mark rin|
|000050f0| 67 20 69 6e 74 6f 20 74 | 68 65 20 62 75 66 66 65 |g into t|he buffe|
|00005100| 72 27 73 20 61 63 74 75 | 61 6c 20 6d 61 72 6b 2e |r's actu|al mark.|
|00005110| 0a 44 6f 65 73 20 6e 6f | 74 20 73 65 74 20 70 6f |.Does no|t set po|
|00005120| 69 6e 74 2e 20 20 44 6f | 65 73 20 6e 6f 74 68 69 |int. Do|es nothi|
|00005130| 6e 67 20 69 66 20 6d 61 | 72 6b 20 72 69 6e 67 20 |ng if ma|rk ring |
|00005140| 69 73 20 65 6d 70 74 79 | 2e 22 20 28 62 79 74 65 |is empty|." (byte|
|00005150| 2d 63 6f 64 65 20 22 08 | 85 29 00 c2 08 c3 c4 20 |-code ".|.)..... |
|00005160| 21 43 5c 22 89 10 88 c5 | c6 08 40 5c 5c 21 88 c7 |!C\"....|..@\\!..|
|00005170| 08 40 c1 5c 22 88 c8 20 | 3f 85 24 00 c9 20 88 08 |.@.\".. |?.$.. ..|
|00005180| 41 89 10 87 22 20 5b 6d | 61 72 6b 2d 72 69 6e 67 |A..." [m|ark-ring|
|00005190| 20 6e 69 6c 20 6e 63 6f | 6e 63 20 63 6f 70 79 2d | nil nco|nc copy-|
|000051a0| 6d 61 72 6b 65 72 20 6d | 61 72 6b 2d 6d 61 72 6b |marker m|ark-mark|
|000051b0| 65 72 20 73 65 74 2d 6d | 61 72 6b 20 30 20 6d 6f |er set-m|ark 0 mo|
|000051c0| 76 65 2d 6d 61 72 6b 65 | 72 20 6d 61 72 6b 20 64 |ve-marke|r mark d|
|000051d0| 69 6e 67 5d 20 39 29 29 | 0a 0a 28 66 73 65 74 20 |ing] 9))|..(fset |
|000051e0| 28 71 75 6f 74 65 20 65 | 78 63 68 61 6e 67 65 2d |(quote e|xchange-|
|000051f0| 64 6f 74 2d 61 6e 64 2d | 6d 61 72 6b 29 20 28 71 |dot-and-|mark) (q|
|00005200| 75 6f 74 65 20 65 78 63 | 68 61 6e 67 65 2d 70 6f |uote exc|hange-po|
|00005210| 69 6e 74 2d 61 6e 64 2d | 6d 61 72 6b 29 29 0a 0a |int-and-|mark))..|
|00005220| 28 64 65 66 75 6e 20 65 | 78 63 68 61 6e 67 65 2d |(defun e|xchange-|
|00005230| 70 6f 69 6e 74 2d 61 6e | 64 2d 6d 61 72 6b 20 6e |point-an|d-mark n|
|00005240| 69 6c 20 22 5c 0a 50 75 | 74 20 74 68 65 20 6d 61 |il "\.Pu|t the ma|
|00005250| 72 6b 20 77 68 65 72 65 | 20 70 6f 69 6e 74 20 69 |rk where| point i|
|00005260| 73 20 6e 6f 77 2c 20 61 | 6e 64 20 70 6f 69 6e 74 |s now, a|nd point|
|00005270| 20 77 68 65 72 65 20 74 | 68 65 20 6d 61 72 6b 20 | where t|he mark |
|00005280| 69 73 20 6e 6f 77 2e 22 | 20 28 69 6e 74 65 72 61 |is now."| (intera|
|00005290| 63 74 69 76 65 20 6e 69 | 6c 29 20 28 62 79 74 65 |ctive ni|l) (byte|
|000052a0| 2d 63 6f 64 65 20 22 c0 | 88 c2 20 19 09 3f 85 0d |-code ".|.. ..?..|
|000052b0| 00 c3 c4 21 88 c5 60 21 | 88 09 62 88 c0 29 87 22 |...!..`!|..b..)."|
|000052c0| 20 5b 6e 69 6c 20 6f 6d | 61 72 6b 20 6d 61 72 6b | [nil om|ark mark|
|000052d0| 20 65 72 72 6f 72 20 22 | 4e 6f 20 6d 61 72 6b 20 | error "|No mark |
|000052e0| 73 65 74 20 69 6e 20 74 | 68 69 73 20 62 75 66 66 |set in t|his buff|
|000052f0| 65 72 22 20 73 65 74 2d | 6d 61 72 6b 5d 20 34 29 |er" set-|mark] 4)|
|00005300| 29 0a 0a 28 64 65 66 75 | 6e 20 6e 65 78 74 2d 6c |)..(defu|n next-l|
|00005310| 69 6e 65 20 28 61 72 67 | 29 20 22 5c 0a 4d 6f 76 |ine (arg|) "\.Mov|
|00005320| 65 20 63 75 72 73 6f 72 | 20 76 65 72 74 69 63 61 |e cursor| vertica|
|00005330| 6c 6c 79 20 64 6f 77 6e | 20 41 52 47 20 6c 69 6e |lly down| ARG lin|
|00005340| 65 73 2e 0a 49 66 20 74 | 68 65 72 65 20 69 73 20 |es..If t|here is |
|00005350| 6e 6f 20 63 68 61 72 61 | 63 74 65 72 20 69 6e 20 |no chara|cter in |
|00005360| 74 68 65 20 74 61 72 67 | 65 74 20 6c 69 6e 65 20 |the targ|et line |
|00005370| 65 78 61 63 74 6c 79 20 | 75 6e 64 65 72 20 74 68 |exactly |under th|
|00005380| 65 20 63 75 72 72 65 6e | 74 20 63 6f 6c 75 6d 6e |e curren|t column|
|00005390| 2c 0a 74 68 65 20 63 75 | 72 73 6f 72 20 69 73 20 |,.the cu|rsor is |
|000053a0| 70 6f 73 69 74 69 6f 6e | 65 64 20 61 66 74 65 72 |position|ed after|
|000053b0| 20 74 68 65 20 63 68 61 | 72 61 63 74 65 72 20 69 | the cha|racter i|
|000053c0| 6e 20 74 68 61 74 20 6c | 69 6e 65 20 77 68 69 63 |n that l|ine whic|
|000053d0| 68 20 73 70 61 6e 73 20 | 74 68 69 73 0a 63 6f 6c |h spans |this.col|
|000053e0| 75 6d 6e 2c 20 6f 72 20 | 61 74 20 74 68 65 20 65 |umn, or |at the e|
|000053f0| 6e 64 20 6f 66 20 74 68 | 65 20 6c 69 6e 65 20 69 |nd of th|e line i|
|00005400| 66 20 69 74 20 69 73 20 | 6e 6f 74 20 6c 6f 6e 67 |f it is |not long|
|00005410| 20 65 6e 6f 75 67 68 2e | 0a 49 66 20 74 68 65 72 | enough.|.If ther|
|00005420| 65 20 69 73 20 6e 6f 20 | 6c 69 6e 65 20 69 6e 20 |e is no |line in |
|00005430| 74 68 65 20 62 75 66 66 | 65 72 20 61 66 74 65 72 |the buff|er after|
|00005440| 20 74 68 69 73 20 6f 6e | 65 2c 0a 61 20 6e 65 77 | this on|e,.a new|
|00005450| 6c 69 6e 65 20 63 68 61 | 72 61 63 74 65 72 20 69 |line cha|racter i|
|00005460| 73 20 69 6e 73 65 72 74 | 65 64 20 74 6f 20 63 72 |s insert|ed to cr|
|00005470| 65 61 74 65 20 61 20 6c | 69 6e 65 0a 61 6e 64 20 |eate a l|ine.and |
|00005480| 74 68 65 20 63 75 72 73 | 6f 72 20 6d 6f 76 65 73 |the curs|or moves|
|00005490| 20 74 6f 20 74 68 61 74 | 20 6c 69 6e 65 2e 0a 0a | to that| line...|
|000054a0| 54 68 65 20 63 6f 6d 6d | 61 6e 64 20 5c 5c 5b 73 |The comm|and \\[s|
|000054b0| 65 74 2d 67 6f 61 6c 2d | 63 6f 6c 75 6d 6e 5d 20 |et-goal-|column] |
|000054c0| 63 61 6e 20 62 65 20 75 | 73 65 64 20 74 6f 20 63 |can be u|sed to c|
|000054d0| 72 65 61 74 65 0a 61 20 | 73 65 6d 69 70 65 72 6d |reate.a |semiperm|
|000054e0| 61 6e 65 6e 74 20 67 6f | 61 6c 20 63 6f 6c 75 6d |anent go|al colum|
|000054f0| 6e 20 74 6f 20 77 68 69 | 63 68 20 74 68 69 73 20 |n to whi|ch this |
|00005500| 63 6f 6d 6d 61 6e 64 20 | 61 6c 77 61 79 73 20 6d |command |always m|
|00005510| 6f 76 65 73 2e 0a 54 68 | 65 6e 20 69 74 20 64 6f |oves..Th|en it do|
|00005520| 65 73 20 6e 6f 74 20 74 | 72 79 20 74 6f 20 6d 6f |es not t|ry to mo|
|00005530| 76 65 20 76 65 72 74 69 | 63 61 6c 6c 79 2e 0a 0a |ve verti|cally...|
|00005540| 49 66 20 79 6f 75 20 61 | 72 65 20 74 68 69 6e 6b |If you a|re think|
|00005550| 69 6e 67 20 6f 66 20 75 | 73 69 6e 67 20 74 68 69 |ing of u|sing thi|
|00005560| 73 20 69 6e 20 61 20 4c | 69 73 70 20 70 72 6f 67 |s in a L|isp prog|
|00005570| 72 61 6d 2c 20 63 6f 6e | 73 69 64 65 72 0a 75 73 |ram, con|sider.us|
|00005580| 69 6e 67 20 60 66 6f 72 | 77 61 72 64 2d 6c 69 6e |ing `for|ward-lin|
|00005590| 65 27 20 69 6e 73 74 65 | 61 64 2e 20 20 49 74 20 |e' inste|ad. It |
|000055a0| 69 73 20 75 73 75 61 6c | 6c 79 20 65 61 73 69 65 |is usual|ly easie|
|000055b0| 72 20 74 6f 20 75 73 65 | 0a 61 6e 64 20 6d 6f 72 |r to use|.and mor|
|000055c0| 65 20 72 65 6c 69 61 62 | 6c 65 20 28 6e 6f 20 64 |e reliab|le (no d|
|000055d0| 65 70 65 6e 64 65 6e 63 | 65 20 6f 6e 20 67 6f 61 |ependenc|e on goa|
|000055e0| 6c 20 63 6f 6c 75 6d 6e | 2c 20 65 74 63 2e 29 2e |l column|, etc.).|
|000055f0| 22 20 28 69 6e 74 65 72 | 61 63 74 69 76 65 20 22 |" (inter|active "|
|00005600| 70 22 29 20 28 62 79 74 | 65 2d 63 6f 64 65 20 22 |p") (byt|e-code "|
|00005610| c2 88 08 c3 55 83 2a 00 | 60 19 c4 c3 21 88 09 60 |....U.*.|`...!..`|
|00005620| 55 86 18 00 68 c5 3d 3f | 83 20 00 c5 63 82 26 00 |U...h.=?|. ..c.&.|
|00005630| 09 62 88 c6 08 21 29 82 | 2d 00 c6 08 21 88 c2 87 |.b...!).|-...!...|
|00005640| 22 20 5b 61 72 67 20 6f | 70 6f 69 6e 74 20 6e 69 |" [arg o|point ni|
|00005650| 6c 20 31 20 66 6f 72 77 | 61 72 64 2d 6c 69 6e 65 |l 1 forw|ard-line|
|00005660| 20 31 30 20 6e 65 78 74 | 2d 6c 69 6e 65 2d 69 6e | 10 next|-line-in|
|00005670| 74 65 72 6e 61 6c 5d 20 | 34 29 29 0a 0a 28 64 65 |ternal] |4))..(de|
|00005680| 66 75 6e 20 70 72 65 76 | 69 6f 75 73 2d 6c 69 6e |fun prev|ious-lin|
|00005690| 65 20 28 61 72 67 29 20 | 22 5c 0a 4d 6f 76 65 20 |e (arg) |"\.Move |
|000056a0| 63 75 72 73 6f 72 20 76 | 65 72 74 69 63 61 6c 6c |cursor v|erticall|
|000056b0| 79 20 75 70 20 41 52 47 | 20 6c 69 6e 65 73 2e 0a |y up ARG| lines..|
|000056c0| 49 66 20 74 68 65 72 65 | 20 69 73 20 6e 6f 20 63 |If there| is no c|
|000056d0| 68 61 72 61 63 74 65 72 | 20 69 6e 20 74 68 65 20 |haracter| in the |
|000056e0| 74 61 72 67 65 74 20 6c | 69 6e 65 20 65 78 61 63 |target l|ine exac|
|000056f0| 74 6c 79 20 6f 76 65 72 | 20 74 68 65 20 63 75 72 |tly over| the cur|
|00005700| 72 65 6e 74 20 63 6f 6c | 75 6d 6e 2c 0a 74 68 65 |rent col|umn,.the|
|00005710| 20 63 75 72 73 6f 72 20 | 69 73 20 70 6f 73 69 74 | cursor |is posit|
|00005720| 69 6f 6e 65 64 20 61 66 | 74 65 72 20 74 68 65 20 |ioned af|ter the |
|00005730| 63 68 61 72 61 63 74 65 | 72 20 69 6e 20 74 68 61 |characte|r in tha|
|00005740| 74 20 6c 69 6e 65 20 77 | 68 69 63 68 20 73 70 61 |t line w|hich spa|
|00005750| 6e 73 20 74 68 69 73 0a | 63 6f 6c 75 6d 6e 2c 20 |ns this.|column, |
|00005760| 6f 72 20 61 74 20 74 68 | 65 20 65 6e 64 20 6f 66 |or at th|e end of|
|00005770| 20 74 68 65 20 6c 69 6e | 65 20 69 66 20 69 74 20 | the lin|e if it |
|00005780| 69 73 20 6e 6f 74 20 6c | 6f 6e 67 20 65 6e 6f 75 |is not l|ong enou|
|00005790| 67 68 2e 0a 0a 54 68 65 | 20 63 6f 6d 6d 61 6e 64 |gh...The| command|
|000057a0| 20 5c 5c 5b 73 65 74 2d | 67 6f 61 6c 2d 63 6f 6c | \\[set-|goal-col|
|000057b0| 75 6d 6e 5d 20 63 61 6e | 20 62 65 20 75 73 65 64 |umn] can| be used|
|000057c0| 20 74 6f 20 63 72 65 61 | 74 65 0a 61 20 73 65 6d | to crea|te.a sem|
|000057d0| 69 70 65 72 6d 61 6e 65 | 6e 74 20 67 6f 61 6c 20 |ipermane|nt goal |
|000057e0| 63 6f 6c 75 6d 6e 20 74 | 6f 20 77 68 69 63 68 20 |column t|o which |
|000057f0| 74 68 69 73 20 63 6f 6d | 6d 61 6e 64 20 61 6c 77 |this com|mand alw|
|00005800| 61 79 73 20 6d 6f 76 65 | 73 2e 0a 54 68 65 6e 20 |ays move|s..Then |
|00005810| 69 74 20 64 6f 65 73 20 | 6e 6f 74 20 74 72 79 20 |it does |not try |
|00005820| 74 6f 20 6d 6f 76 65 20 | 76 65 72 74 69 63 61 6c |to move |vertical|
|00005830| 6c 79 2e 0a 0a 49 66 20 | 79 6f 75 20 61 72 65 20 |ly...If |you are |
|00005840| 74 68 69 6e 6b 69 6e 67 | 20 6f 66 20 75 73 69 6e |thinking| of usin|
|00005850| 67 20 74 68 69 73 20 69 | 6e 20 61 20 4c 69 73 70 |g this i|n a Lisp|
|00005860| 20 70 72 6f 67 72 61 6d | 2c 20 63 6f 6e 73 69 64 | program|, consid|
|00005870| 65 72 20 75 73 69 6e 67 | 0a 60 66 6f 72 77 61 72 |er using|.`forwar|
|00005880| 64 2d 6c 69 6e 65 27 20 | 77 69 74 68 20 6e 65 67 |d-line' |with neg|
|00005890| 61 74 69 76 65 20 61 72 | 67 75 6d 65 6e 74 20 69 |ative ar|gument i|
|000058a0| 6e 73 74 65 61 64 2e 2e | 20 20 49 74 20 69 73 20 |nstead..| It is |
|000058b0| 75 73 75 61 6c 6c 79 20 | 65 61 73 69 65 72 0a 74 |usually |easier.t|
|000058c0| 6f 20 75 73 65 20 61 6e | 64 20 6d 6f 72 65 20 72 |o use an|d more r|
|000058d0| 65 6c 69 61 62 6c 65 20 | 28 6e 6f 20 64 65 70 65 |eliable |(no depe|
|000058e0| 6e 64 65 6e 63 65 20 6f | 6e 20 67 6f 61 6c 20 63 |ndence o|n goal c|
|000058f0| 6f 6c 75 6d 6e 2c 20 65 | 74 63 2e 29 2e 22 20 28 |olumn, e|tc.)." (|
|00005900| 69 6e 74 65 72 61 63 74 | 69 76 65 20 22 70 22 29 |interact|ive "p")|
|00005910| 20 28 62 79 74 65 2d 63 | 6f 64 65 20 22 c1 88 c2 | (byte-c|ode "...|
|00005920| 08 5b 21 88 c1 87 22 20 | 5b 61 72 67 20 6e 69 6c |.[!..." |[arg nil|
|00005930| 20 6e 65 78 74 2d 6c 69 | 6e 65 2d 69 6e 74 65 72 | next-li|ne-inter|
|00005940| 6e 61 6c 5d 20 32 29 29 | 0a 0a 28 64 65 66 63 6f |nal] 2))|..(defco|
|00005950| 6e 73 74 20 74 72 61 63 | 6b 2d 65 6f 6c 20 6e 69 |nst trac|k-eol ni|
|00005960| 6c 20 22 5c 0a 2a 4e 6f | 6e 2d 6e 69 6c 20 6d 65 |l "\.*No|n-nil me|
|00005970| 61 6e 73 20 76 65 72 74 | 69 63 61 6c 20 6d 6f 74 |ans vert|ical mot|
|00005980| 69 6f 6e 20 73 74 61 72 | 74 69 6e 67 20 61 74 20 |ion star|ting at |
|00005990| 74 68 65 20 65 6e 64 20 | 6f 66 20 61 20 6c 69 6e |the end |of a lin|
|000059a0| 65 20 73 68 6f 75 6c 64 | 20 6b 65 65 70 20 74 6f |e should| keep to|
|000059b0| 20 65 6e 64 73 20 6f 66 | 20 6c 69 6e 65 73 2e 0a | ends of| lines..|
|000059c0| 54 68 69 73 20 6d 65 61 | 6e 73 20 6d 6f 76 69 6e |This mea|ns movin|
|000059d0| 67 20 74 6f 20 74 68 65 | 20 65 6e 64 20 6f 66 20 |g to the| end of |
|000059e0| 65 61 63 68 20 6c 69 6e | 65 20 6d 6f 76 65 64 20 |each lin|e moved |
|000059f0| 6f 6e 74 6f 2e 22 29 0a | 0a 28 64 65 66 76 61 72 |onto.").|.(defvar|
|00005a00| 20 67 6f 61 6c 2d 63 6f | 6c 75 6d 6e 20 6e 69 6c | goal-co|lumn nil|
|00005a10| 20 22 5c 0a 2a 53 65 6d | 69 70 65 72 6d 61 6e 65 | "\.*Sem|ipermane|
|00005a20| 6e 74 20 67 6f 61 6c 20 | 63 6f 6c 75 6d 6e 20 66 |nt goal |column f|
|00005a30| 6f 72 20 76 65 72 74 69 | 63 61 6c 20 6d 6f 74 69 |or verti|cal moti|
|00005a40| 6f 6e 2c 20 61 73 20 73 | 65 74 20 62 79 20 5c 5c |on, as s|et by \\|
|00005a50| 5b 73 65 74 2d 67 6f 61 | 6c 2d 63 6f 6c 75 6d 6e |[set-goa|l-column|
|00005a60| 5d 2c 20 6f 72 20 6e 69 | 6c 2e 22 29 0a 0a 28 64 |], or ni|l.")..(d|
|00005a70| 65 66 76 61 72 20 74 65 | 6d 70 6f 72 61 72 79 2d |efvar te|mporary-|
|00005a80| 67 6f 61 6c 2d 63 6f 6c | 75 6d 6e 20 30 20 22 5c |goal-col|umn 0 "\|
|00005a90| 0a 43 75 72 72 65 6e 74 | 20 67 6f 61 6c 20 63 6f |.Current| goal co|
|00005aa0| 6c 75 6d 6e 20 66 6f 72 | 20 76 65 72 74 69 63 61 |lumn for| vertica|
|00005ab0| 6c 20 6d 6f 74 69 6f 6e | 2e 0a 49 74 20 69 73 20 |l motion|..It is |
|00005ac0| 74 68 65 20 63 6f 6c 75 | 6d 6e 20 77 68 65 72 65 |the colu|mn where|
|00005ad0| 20 70 6f 69 6e 74 20 77 | 61 73 20 61 74 20 74 68 | point w|as at th|
|00005ae0| 65 20 73 74 61 72 74 20 | 6f 66 20 63 75 72 72 65 |e start |of curre|
|00005af0| 6e 74 20 72 75 6e 20 6f | 66 20 76 65 72 74 69 63 |nt run o|f vertic|
|00005b00| 61 6c 20 6d 6f 74 69 6f | 6e 20 63 6f 6d 6d 61 6e |al motio|n comman|
|00005b10| 64 73 2e 22 29 0a 0a 28 | 64 65 66 75 6e 20 6e 65 |ds.")..(|defun ne|
|00005b20| 78 74 2d 6c 69 6e 65 2d | 69 6e 74 65 72 6e 61 6c |xt-line-|internal|
|00005b30| 20 28 61 72 67 29 20 28 | 62 79 74 65 2d 63 6f 64 | (arg) (|byte-cod|
|00005b40| 65 20 22 08 c8 3d 86 09 | 00 08 c9 3d 3f 85 1c 00 |e "..=..|...=?...|
|00005b50| 0a 85 12 00 6c 83 19 00 | c3 82 1a 00 69 89 11 88 |....l...|....i...|
|00005b60| ca 0c 21 3f 83 2a 00 cb | 0d 21 82 5a 00 0d cc 56 |..!?.*..|.!.Z...V|
|00005b70| 85 44 00 cd ce 21 88 cf | d0 21 88 cb ce 21 88 0d |.D...!..|.!...!..|
|00005b80| 53 89 15 88 82 2a 00 88 | 0d cc 57 85 5a 00 cd d0 |S....*..|..W.Z...|
|00005b90| 21 88 d1 20 88 0d 54 89 | 15 88 82 45 00 88 0e 06 |!.. ..T.|...E....|
|00005ba0| 86 61 00 09 c3 3d 83 6b | 00 d2 20 82 73 00 d3 0e |.a...=.k|.. .s...|
|00005bb0| 06 86 72 00 09 21 88 c7 | 87 22 20 5b 6c 61 73 74 |..r..!..|." [last|
|00005bc0| 2d 63 6f 6d 6d 61 6e 64 | 20 74 65 6d 70 6f 72 61 |-command| tempora|
|00005bd0| 72 79 2d 67 6f 61 6c 2d | 63 6f 6c 75 6d 6e 20 74 |ry-goal-|column t|
|00005be0| 72 61 63 6b 2d 65 6f 6c | 20 74 20 73 65 6c 65 63 |rack-eol| t selec|
|00005bf0| 74 69 76 65 2d 64 69 73 | 70 6c 61 79 20 61 72 67 |tive-dis|play arg|
|00005c00| 20 67 6f 61 6c 2d 63 6f | 6c 75 6d 6e 20 6e 69 6c | goal-co|lumn nil|
|00005c10| 20 6e 65 78 74 2d 6c 69 | 6e 65 20 70 72 65 76 69 | next-li|ne previ|
|00005c20| 6f 75 73 2d 6c 69 6e 65 | 20 69 6e 74 65 67 65 72 |ous-line| integer|
|00005c30| 70 20 66 6f 72 77 61 72 | 64 2d 6c 69 6e 65 20 30 |p forwar|d-line 0|
|00005c40| 20 76 65 72 74 69 63 61 | 6c 2d 6d 6f 74 69 6f 6e | vertica|l-motion|
|00005c50| 20 31 20 66 6f 72 77 61 | 72 64 2d 63 68 61 72 20 | 1 forwa|rd-char |
|00005c60| 2d 31 20 62 65 67 69 6e | 6e 69 6e 67 2d 6f 66 2d |-1 begin|ning-of-|
|00005c70| 6c 69 6e 65 20 65 6e 64 | 2d 6f 66 2d 6c 69 6e 65 |line end|-of-line|
|00005c80| 20 6d 6f 76 65 2d 74 6f | 2d 63 6f 6c 75 6d 6e 5d | move-to|-column]|
|00005c90| 20 31 30 29 29 0a 0a 28 | 64 65 66 75 6e 20 73 65 | 10))..(|defun se|
|00005ca0| 74 2d 67 6f 61 6c 2d 63 | 6f 6c 75 6d 6e 20 28 61 |t-goal-c|olumn (a|
|00005cb0| 72 67 29 20 22 5c 0a 53 | 65 74 20 74 68 65 20 63 |rg) "\.S|et the c|
|00005cc0| 75 72 72 65 6e 74 20 68 | 6f 72 69 7a 6f 6e 74 61 |urrent h|orizonta|
|00005cd0| 6c 20 70 6f 73 69 74 69 | 6f 6e 20 61 73 20 61 20 |l positi|on as a |
|00005ce0| 67 6f 61 6c 20 66 6f 72 | 20 5c 5c 5b 6e 65 78 74 |goal for| \\[next|
|00005cf0| 2d 6c 69 6e 65 5d 20 61 | 6e 64 20 5c 5c 5b 70 72 |-line] a|nd \\[pr|
|00005d00| 65 76 69 6f 75 73 2d 6c | 69 6e 65 5d 2e 0a 54 68 |evious-l|ine]..Th|
|00005d10| 6f 73 65 20 63 6f 6d 6d | 61 6e 64 73 20 77 69 6c |ose comm|ands wil|
|00005d20| 6c 20 6d 6f 76 65 20 74 | 6f 20 74 68 69 73 20 70 |l move t|o this p|
|00005d30| 6f 73 69 74 69 6f 6e 20 | 69 6e 20 74 68 65 20 6c |osition |in the l|
|00005d40| 69 6e 65 20 6d 6f 76 65 | 64 20 74 6f 0a 72 61 74 |ine move|d to.rat|
|00005d50| 68 65 72 20 74 68 61 6e | 20 74 72 79 69 6e 67 20 |her than| trying |
|00005d60| 74 6f 20 6b 65 65 70 20 | 74 68 65 20 73 61 6d 65 |to keep |the same|
|00005d70| 20 68 6f 72 69 7a 6f 6e | 74 61 6c 20 70 6f 73 69 | horizon|tal posi|
|00005d80| 74 69 6f 6e 2e 0a 57 69 | 74 68 20 61 20 6e 6f 6e |tion..Wi|th a non|
|00005d90| 2d 6e 69 6c 20 61 72 67 | 75 6d 65 6e 74 2c 20 63 |-nil arg|ument, c|
|00005da0| 6c 65 61 72 73 20 6f 75 | 74 20 74 68 65 20 67 6f |lears ou|t the go|
|00005db0| 61 6c 20 63 6f 6c 75 6d | 6e 0a 73 6f 20 74 68 61 |al colum|n.so tha|
|00005dc0| 74 20 5c 5c 5b 6e 65 78 | 74 2d 6c 69 6e 65 5d 20 |t \\[nex|t-line] |
|00005dd0| 61 6e 64 20 5c 5c 5b 70 | 72 65 76 69 6f 75 73 2d |and \\[p|revious-|
|00005de0| 6c 69 6e 65 5d 20 72 65 | 73 75 6d 65 20 76 65 72 |line] re|sume ver|
|00005df0| 74 69 63 61 6c 20 6d 6f | 74 69 6f 6e 2e 22 20 28 |tical mo|tion." (|
|00005e00| 69 6e 74 65 72 61 63 74 | 69 76 65 20 22 50 22 29 |interact|ive "P")|
|00005e10| 20 28 62 79 74 65 2d 63 | 6f 64 65 20 22 c2 88 08 | (byte-c|ode "...|
|00005e20| 83 10 00 c2 89 11 88 c3 | c4 21 82 1a 00 69 89 11 |........|.!...i..|
|00005e30| 88 c3 c5 c6 21 09 5c 22 | 88 c2 87 22 20 5b 61 72 |....!.\"|..." [ar|
|00005e40| 67 20 67 6f 61 6c 2d 63 | 6f 6c 75 6d 6e 20 6e 69 |g goal-c|olumn ni|
|00005e50| 6c 20 6d 65 73 73 61 67 | 65 20 22 4e 6f 20 67 6f |l messag|e "No go|
|00005e60| 61 6c 20 63 6f 6c 75 6d | 6e 22 20 73 75 62 73 74 |al colum|n" subst|
|00005e70| 69 74 75 74 65 2d 63 6f | 6d 6d 61 6e 64 2d 6b 65 |itute-co|mmand-ke|
|00005e80| 79 73 20 22 47 6f 61 6c | 20 63 6f 6c 75 6d 6e 20 |ys "Goal| column |
|00005e90| 25 64 20 28 75 73 65 20 | 5c 5c 5b 73 65 74 2d 67 |%d (use |\\[set-g|
|00005ea0| 6f 61 6c 2d 63 6f 6c 75 | 6d 6e 5d 20 77 69 74 68 |oal-colu|mn] with|
|00005eb0| 20 61 6e 20 61 72 67 20 | 74 6f 20 75 6e 73 65 74 | an arg |to unset|
|00005ec0| 20 69 74 29 22 5d 20 35 | 29 29 0a 0a 28 64 65 66 | it)"] 5|))..(def|
|00005ed0| 75 6e 20 74 72 61 6e 73 | 70 6f 73 65 2d 63 68 61 |un trans|pose-cha|
|00005ee0| 72 73 20 28 61 72 67 29 | 20 22 5c 0a 49 6e 74 65 |rs (arg)| "\.Inte|
|00005ef0| 72 63 68 61 6e 67 65 20 | 63 68 61 72 61 63 74 65 |rchange |characte|
|00005f00| 72 73 20 61 72 6f 75 6e | 64 20 70 6f 69 6e 74 2c |rs aroun|d point,|
|00005f10| 20 6d 6f 76 69 6e 67 20 | 66 6f 72 77 61 72 64 20 | moving |forward |
|00005f20| 6f 6e 65 20 63 68 61 72 | 61 63 74 65 72 2e 0a 57 |one char|acter..W|
|00005f30| 69 74 68 20 70 72 65 66 | 69 78 20 61 72 67 20 41 |ith pref|ix arg A|
|00005f40| 52 47 2c 20 65 66 66 65 | 63 74 20 69 73 20 74 6f |RG, effe|ct is to|
|00005f50| 20 74 61 6b 65 20 63 68 | 61 72 61 63 74 65 72 20 | take ch|aracter |
|00005f60| 62 65 66 6f 72 65 20 70 | 6f 69 6e 74 0a 61 6e 64 |before p|oint.and|
|00005f70| 20 64 72 61 67 20 69 74 | 20 66 6f 72 77 61 72 64 | drag it| forward|
|00005f80| 20 70 61 73 74 20 41 52 | 47 20 6f 74 68 65 72 20 | past AR|G other |
|00005f90| 63 68 61 72 61 63 74 65 | 72 73 20 28 62 61 63 6b |characte|rs (back|
|00005fa0| 77 61 72 64 20 69 66 20 | 41 52 47 20 6e 65 67 61 |ward if |ARG nega|
|00005fb0| 74 69 76 65 29 2e 0a 49 | 66 20 6e 6f 20 61 72 67 |tive)..I|f no arg|
|00005fc0| 75 6d 65 6e 74 20 61 6e | 64 20 61 74 20 65 6e 64 |ument an|d at end|
|00005fd0| 20 6f 66 20 6c 69 6e 65 | 2c 20 74 68 65 20 70 72 | of line|, the pr|
|00005fe0| 65 76 69 6f 75 73 20 74 | 77 6f 20 63 68 61 72 73 |evious t|wo chars|
|00005ff0| 20 61 72 65 20 65 78 63 | 68 61 6e 67 65 64 2e 22 | are exc|hanged."|
|00006000| 20 28 69 6e 74 65 72 61 | 63 74 69 76 65 20 22 2a | (intera|ctive "*|
|00006010| 50 22 29 20 28 62 79 74 | 65 2d 63 6f 64 65 20 22 |P") (byt|e-code "|
|00006020| c1 88 08 3f 85 0e 00 6c | 85 0e 00 c2 c3 21 88 c4 |...?...l|.....!..|
|00006030| c2 c5 08 21 5c 22 87 22 | 20 5b 61 72 67 20 6e 69 |...!\"."| [arg ni|
|00006040| 6c 20 66 6f 72 77 61 72 | 64 2d 63 68 61 72 20 2d |l forwar|d-char -|
|00006050| 31 20 74 72 61 6e 73 70 | 6f 73 65 2d 73 75 62 72 |1 transp|ose-subr|
|00006060| 20 70 72 65 66 69 78 2d | 6e 75 6d 65 72 69 63 2d | prefix-|numeric-|
|00006070| 76 61 6c 75 65 5d 20 35 | 29 29 0a 0a 28 64 65 66 |value] 5|))..(def|
|00006080| 75 6e 20 74 72 61 6e 73 | 70 6f 73 65 2d 77 6f 72 |un trans|pose-wor|
|00006090| 64 73 20 28 61 72 67 29 | 20 22 5c 0a 49 6e 74 65 |ds (arg)| "\.Inte|
|000060a0| 72 63 68 61 6e 67 65 20 | 77 6f 72 64 73 20 61 72 |rchange |words ar|
|000060b0| 6f 75 6e 64 20 70 6f 69 | 6e 74 2c 20 6c 65 61 76 |ound poi|nt, leav|
|000060c0| 69 6e 67 20 70 6f 69 6e | 74 20 61 74 20 65 6e 64 |ing poin|t at end|
|000060d0| 20 6f 66 20 74 68 65 6d | 2e 0a 57 69 74 68 20 70 | of them|..With p|
|000060e0| 72 65 66 69 78 20 61 72 | 67 20 41 52 47 2c 20 65 |refix ar|g ARG, e|
|000060f0| 66 66 65 63 74 20 69 73 | 20 74 6f 20 74 61 6b 65 |ffect is| to take|
|00006100| 20 77 6f 72 64 20 62 65 | 66 6f 72 65 20 6f 72 20 | word be|fore or |
|00006110| 61 72 6f 75 6e 64 20 70 | 6f 69 6e 74 0a 61 6e 64 |around p|oint.and|
|00006120| 20 64 72 61 67 20 69 74 | 20 66 6f 72 77 61 72 64 | drag it| forward|
|00006130| 20 70 61 73 74 20 41 52 | 47 20 6f 74 68 65 72 20 | past AR|G other |
|00006140| 77 6f 72 64 73 20 28 62 | 61 63 6b 77 61 72 64 20 |words (b|ackward |
|00006150| 69 66 20 41 52 47 20 6e | 65 67 61 74 69 76 65 29 |if ARG n|egative)|
|00006160| 2e 0a 49 66 20 41 52 47 | 20 69 73 20 7a 65 72 6f |..If ARG| is zero|
|00006170| 2c 20 74 68 65 20 77 6f | 72 64 73 20 61 72 6f 75 |, the wo|rds arou|
|00006180| 6e 64 20 6f 72 20 61 66 | 74 65 72 20 70 6f 69 6e |nd or af|ter poin|
|00006190| 74 20 61 6e 64 20 61 72 | 6f 75 6e 64 20 6f 72 20 |t and ar|ound or |
|000061a0| 61 66 74 65 72 20 6d 61 | 72 6b 0a 61 72 65 20 69 |after ma|rk.are i|
|000061b0| 6e 74 65 72 63 68 61 6e | 67 65 64 2e 22 20 28 69 |nterchan|ged." (i|
|000061c0| 6e 74 65 72 61 63 74 69 | 76 65 20 22 2a 70 22 29 |nteracti|ve "*p")|
|000061d0| 20 28 62 79 74 65 2d 63 | 6f 64 65 20 22 c1 88 c2 | (byte-c|ode "...|
|000061e0| c3 08 5c 22 87 22 20 5b | 61 72 67 20 6e 69 6c 20 |..\"." [|arg nil |
|000061f0| 74 72 61 6e 73 70 6f 73 | 65 2d 73 75 62 72 20 66 |transpos|e-subr f|
|00006200| 6f 72 77 61 72 64 2d 77 | 6f 72 64 5d 20 33 29 29 |orward-w|ord] 3))|
|00006210| 0a 0a 28 64 65 66 75 6e | 20 74 72 61 6e 73 70 6f |..(defun| transpo|
|00006220| 73 65 2d 73 65 78 70 73 | 20 28 61 72 67 29 20 22 |se-sexps| (arg) "|
|00006230| 5c 0a 4c 69 6b 65 20 5c | 5c 5b 74 72 61 6e 73 70 |\.Like \|\[transp|
|00006240| 6f 73 65 2d 77 6f 72 64 | 73 5d 20 62 75 74 20 61 |ose-word|s] but a|
|00006250| 70 70 6c 69 65 73 20 74 | 6f 20 73 65 78 70 73 2e |pplies t|o sexps.|
|00006260| 0a 44 6f 65 73 20 6e 6f | 74 20 77 6f 72 6b 20 6f |.Does no|t work o|
|00006270| 6e 20 61 20 73 65 78 70 | 20 74 68 61 74 20 70 6f |n a sexp| that po|
|00006280| 69 6e 74 20 69 73 20 69 | 6e 20 74 68 65 20 6d 69 |int is i|n the mi|
|00006290| 64 64 6c 65 20 6f 66 0a | 69 66 20 69 74 20 69 73 |ddle of.|if it is|
|000062a0| 20 61 20 6c 69 73 74 20 | 6f 72 20 73 74 72 69 6e | a list |or strin|
|000062b0| 67 2e 22 20 28 69 6e 74 | 65 72 61 63 74 69 76 65 |g." (int|eractive|
|000062c0| 20 22 2a 70 22 29 20 28 | 62 79 74 65 2d 63 6f 64 | "*p") (|byte-cod|
|000062d0| 65 20 22 c1 88 c2 c3 08 | 5c 22 87 22 20 5b 61 72 |e ".....|\"." [ar|
|000062e0| 67 20 6e 69 6c 20 74 72 | 61 6e 73 70 6f 73 65 2d |g nil tr|anspose-|
|000062f0| 73 75 62 72 20 66 6f 72 | 77 61 72 64 2d 73 65 78 |subr for|ward-sex|
|00006300| 70 5d 20 33 29 29 0a 0a | 28 64 65 66 75 6e 20 74 |p] 3))..|(defun t|
|00006310| 72 61 6e 73 70 6f 73 65 | 2d 6c 69 6e 65 73 20 28 |ranspose|-lines (|
|00006320| 61 72 67 29 20 22 5c 0a | 45 78 63 68 61 6e 67 65 |arg) "\.|Exchange|
|00006330| 20 63 75 72 72 65 6e 74 | 20 6c 69 6e 65 20 61 6e | current| line an|
|00006340| 64 20 70 72 65 76 69 6f | 75 73 20 6c 69 6e 65 2c |d previo|us line,|
|00006350| 20 6c 65 61 76 69 6e 67 | 20 70 6f 69 6e 74 20 61 | leaving| point a|
|00006360| 66 74 65 72 20 62 6f 74 | 68 2e 0a 57 69 74 68 20 |fter bot|h..With |
|00006370| 61 72 67 75 6d 65 6e 74 | 20 41 52 47 2c 20 74 61 |argument| ARG, ta|
|00006380| 6b 65 73 20 70 72 65 76 | 69 6f 75 73 20 6c 69 6e |kes prev|ious lin|
|00006390| 65 20 61 6e 64 20 6d 6f | 76 65 73 20 69 74 20 70 |e and mo|ves it p|
|000063a0| 61 73 74 20 41 52 47 20 | 6c 69 6e 65 73 2e 0a 57 |ast ARG |lines..W|
|000063b0| 69 74 68 20 61 72 67 75 | 6d 65 6e 74 20 30 2c 20 |ith argu|ment 0, |
|000063c0| 69 6e 74 65 72 63 68 61 | 6e 67 65 73 20 6c 69 6e |intercha|nges lin|
|000063d0| 65 20 70 6f 69 6e 74 20 | 69 73 20 69 6e 20 77 69 |e point |is in wi|
|000063e0| 74 68 20 6c 69 6e 65 20 | 6d 61 72 6b 20 69 73 20 |th line |mark is |
|000063f0| 69 6e 2e 22 20 28 69 6e | 74 65 72 61 63 74 69 76 |in." (in|teractiv|
+--------+-------------------------+-------------------------+--------+--------+
Only 25.0 KB of data is shown above.